How do get this piece of to exit smoothly without bombing out if the user selects a point out in space or right clicks?
Public Sub GetEntExample()
Dim returnObj As AcadObject
Dim basePnt As Variant
On Error Resume Next
' The following example waits for a selection from the user
RETRY:
ThisDrawing.Utility.GetEntity returnObj, basePnt, "Select an object"
If Err <> 0 Then
Err.Clear
MsgBox "Program ended.", , "GetEntity Example"
Exit Sub
Else
returnObj.Update
MsgBox "The object type is: " & returnObj.EntityName, , "GetEntity Example"
returnObj.Update
End If
GoTo RETRY
End Sub