On Error Resume Next
ddd: ThisDrawing.Utility.GetEntity e, "选起点:"
If TypeName(e) = "IAcadText" Then
e1 = e.TextString
End If
If e1 = "" Or Err Then
MsgBox "E1 未选中,请重新选择!"
Err.Clear
GoTo ddd
End If 直接判断错误号 简单的话,加一句<br/>If InStr(1, ThisDrawing.GetVariable("LASTPROMPT"), "*取消*") Then Exit Sub<br/>就可以,如果再严格一些,则应加上判断出错号-2147352567
页:
[1]