Jump to content

AutoCAD VBA, Showing the AutoCAD editor when a routine ends


muck

Recommended Posts

When the following VBA routine ends it shows

the VBA design editor.

 

'Zoom Window

Private Sub CommandButton1_Click()

Dim vPt1 As Variant

Dim vPt2 As Variant

Me.hide

vPt1 = ThisDrawing.Utility.GetPoint(, "Select Point 1")

vPt2 = ThisDrawing.Utility.GetPoint(, "Select Point 2")

ZoomWindow vPt1, vPt2

'Me.Show

End Sub

 

How can I get this routine to end showing the AutoCAD editor instead

of the VBA design editor when this routine ends?

 

Thank you,

Link to comment
Share on other sites

You could probably use

 

  activedocument.sendcommand("vbaide\r")

 

Can't remeber the ascii character for return you may have to replace the \r with it

Link to comment
Share on other sites

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...