Jump to content

Recommended Posts

Posted

Hello everyone

 

I use "selectatpoint" in my program with VBA, the problem is there is two expected error from the user 1) to not press in entity in this case I want to resume the command and ask him again to select an entity 2)the second error when he press Esc key to cancel the command in this case I want to exit sub

 

The problem is how to differentiate between these two errors (I tried Err.number but it gives the same number)

 

Any advice is really appreciated

 

Thank you

Posted

Here is a part of a code with problem

SelectionPart:

On Error GoTo No_Entity

Utility.GetEntity ob, P1, vbCrLf & "Select object to offset: "

 

No_Entity:

'put code here to differentiate between two cases

' if the user misselect the object go back to selection part

' if he press ESC key to cancel the command then exit sub

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...