Я чуть не опоздал...
Естественно что у тебя выставлено
"Break on Unhandled Errors" в секции
Tools->Options->Error Trapping
Option Explicit
Sub UserInputTest()
Dim pickVar As Variant
Dim retString As String
Dim kWord As String
kWord = "10 20 30 40 50"
With ThisDrawing
.SetVariable "OSMODE", 512
On Error Resume Next
With .Utility
'//
.InitializeUserInput 128, kWord
'// - pick point, user input or press Enter:
pickVar = ThisDrawing.Utility.GetPoint(, "Select point on object or choose a value from list(10,20,30,40,50) <50>: ")
'// - pick point, click on right mouse button, then press Enter:
'pickVar = ThisDrawing.Utility.GetPoint(, "Select point on object or choose a values with right click[10/20/30/40/50] <50>: ")
If Err Then
Err.Clear
End If
If VarType(pickVar) = vbEmpty Then
retString = .GetInput
If retString = "" Then
retString = "50"
MsgBox "You choose the default value: " & retString
Else
MsgBox retString
End If
Else
Dim oSset As AcadSelectionSet
With ThisDrawing.SelectionSets
While .Count > 0
.Item(0).Delete
Wend
Set oSset = .Add("$AtPoint$")
End With
oSset.SelectAtPoint pickVar
If oSset.Count <> 0 Then
Dim oEnt As AcadEntity
Set oEnt = oSset.Item(0)
MsgBox "You selected: " & oEnt.ObjectName
Set oSset = Nothing
Else
MsgBox "You missed, try again"
End If
End If
End With
End With
End Sub
~'J'~