自定义一个函数运行时,出现自动化错误
调用下面这个函数时,总是出现自动化错误,请问错在哪里?Function Sel_collection(startpoint() As Double, endpoint() As Double, selname As String)
Dim FilterType(0) As Integer
Dim FilterData(0) As Variant
Dim flag As Boolean
Dim Sel_array As AcadSelectionSet
FilterType(0) = 0
FilterData(0) = "*POLYLINE"
flag = False
For Each Sel_array In ThisDrawing.SelectionSets
If Sel_array.Name = selname Then
flag = True
Exit For
End If
Next
If flag = True Then
Sel_array.Delete
End If
Set Sel_array = ThisDrawing.SelectionSets.Add(selname)
Sel_array.Select acSelectionSetCrossing, startpoint, endpoint, FilterType, FilterData
End Function
错误提示如下
啊哦,没人回? 大家帮忙看看,哪里有错误,谢谢! 重新引用一下acad对象 zzyong00 发表于 2015-8-5 11:33 static/image/common/back.gif
重新引用一下acad对象
重新引用?这个怎么弄?我是出错后,把整个acad关了,然后再打开重新运行,也会跳出这个错误。 我自己再顶顶 在线坐等,已经好几天了哪位指点一下。 伟大的各位大虾,请帮忙指点一下呀 http://www.baidu.com/baidu?word=vb+%E6%80%8E%E4%B9%88%E5%BC%95%E7%94%A8&ie=utf-8&tn=98012088_2_dg zzyong00 发表于 2015-8-10 21:23 static/image/common/back.gif
http://www.baidu.com/baidu?word=vb+%E6%80%8E%E4%B9%88%E5%BC%95%E7%94%A8&ie=utf-8&tn=98012088_2_dg
我点进去后就成了百度搜索“VB怎么引用”不大明白,是我引用有问题?
页:
[1]
2