Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to execute a form

Status
Not open for further replies.

hoja

Technical User
Dec 3, 2003
102
0
0
US
Hello, can anyone give me a link to some info on how to execute a simple form saved as a .dvb file in autocad.

I created a simple form in vba, but I don't know how to execute it when in Autocad!! I would like to execute from either the command line or by creating a drop down menu in autocad.....any help will be greatly appreciated, thank you

Rod
 
Hi Rod,

In a module, or in the Thisdrawing object of the VBAIDE, create a sub, that calls your form something like this:

Code:
Public Sub Main
 Load UserForm1
 UserForm1.Show
End Sub

HTH
Todd
 
Thank you very much Todd....this works, but is there a way to execute the form straight from the command line by typing the name of the .dvb file maybe. Because this way I have to type _vbarun and then select the macro from the window and then hit RUN....I am trying to cut down on the steps. Would this be possible, thank you

Rod
 
Hi Rod,

Yep...

[ul]
[li] Type "-vbarun" at the command line (no quotes and don't forget the dash (-)). [/li]
[li] Then type "Main" (again, no quotes). [/li]
[/ul]

HTH
Todd
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top