Private Sub CommandButton1_Click() Dim DataType(0 To 1) As Integer Dim Data(0 To 1) As Variant DataType(0) = 1001: Data(0) = TextBox1.Text DataType(1) = 1000: Data(1) = "String"
Dim ssetObj As AcadSelectionSet Dim elem As AcadObject
On Error Resume Next ThisDrawing.SelectionSets("text").Delete Set ssetObj = ThisDrawing.SelectionSets.Add("text") Err.Clear On Error GoTo 0
' Add objects to a selection set by prompting user to select on the screen 'While (True) selectagain: ssetObj.SelectOnScreen For Each elem In ssetObj
Next ' Wend
If ssetObj.Count <> 0 Then ssetObj.Clear GoTo selectagain End If
ssetObj.Delete End Sub
在运行到
ssetObj.SelectOnScreen
时
提示错误:主窗口不可见
请问怎么可以解决啊?