2 questions

2 questions

Anonymous
Not applicable
247 Views
1 Reply
Message 1 of 2

2 questions

Anonymous
Not applicable
1) I made a global .dvb project which automatically loads with each drawing. How do I make a tool button that will bring up the UserForm so that I don't have to go into the
VBA IDE each time I want to run the program?

2) After the program does it's thing it returns to the VBA IDE.
This freaks out some users. Is there a way that I can programmatically not have this happen so that the user is returned to the drawing editor?

Using rel. 2007.
0 Likes
248 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable
Create a Sub to in a Module that opens the form...

Create a new Module, default name will be Module1 (if it's the first unnamed
one)
Add the following code:

Sub StartMyMacro ()
Form1.Show
End Sub


Now you can call it like so to run it:

-vbarun mydvb.dvm!module1.startmymacro

Your users will no longer be taken back to the IDE, either.

Oh, VBA macros need only be loaded once per session, not once per drawing.

wrote in message news:5434560@discussion.autodesk.com...
1) I made a global .dvb project which automatically loads with each
drawing. How do I make a tool button that will bring up the UserForm so
that I don't have to go into the
VBA IDE each time I want to run the program?

2) After the program does it's thing it returns to the VBA IDE.
This freaks out some users. Is there a way that I can programmatically not
have this happen so that the user is returned to the drawing editor?

Using rel. 2007.
0 Likes