muck 发表于 2022-7-6 14:13:20

AutoCAD VBA, Showing the AutoC

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,

ollie 发表于 2022-7-6 16:01:44

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
页: [1]
查看完整版本: AutoCAD VBA, Showing the AutoC