[求助]请问过滤选择时报错是怎么回事?
请教各位,报错信息为'-2147024809(80070057)',程序代码如下:Dim selset As AcadSelectionSet
Set selset = ThisDrawing.SelectionSets.Add("jihe")<BR>filtertype = 0
filterdata = "Text"
<BR>selset.SelectOnScreen filtertype, filterdata<BR>MsgBox ok<BR>For Each entry In selset<BR>Next entry
selset.Delete<BR> filtertype ,filterdata 必须为数组Sub kkk()
Dim selset As AcadSelectionSet
On Error Resume Next
Set selset = ThisDrawing.SelectionSets("jihe")
If Err Then Set selset = ThisDrawing.SelectionSets.Add("jihe")
selset.Clear
Dim filtertype(0 To 0) As Integer
Dim filterdata(0 To 0) As Variant
filtertype(0) = 0filterdata(0) = "Text"
selset.SelectOnScreen filtertype, filterdata
MsgBox selset.Count
End Sub
了解了!谢谢!
页:
[1]