Calling up VBA

Calling up VBA

Anonymous
Not applicable
360 Views
4 Replies
Message 1 of 5

Calling up VBA

Anonymous
Not applicable
Hello.
I have this nice .dvb file that I would like to use by clicking a button on
a toolbar. Only problem I don't know how. I have been looking around on the
internet and haven't found a solution. All I keep finding is code to call up
a Module. I don't have any in my .dvb file. All I have is a Form. All my
code is in the Form. Or they talk about Macro Name. All I have is
Details.dvb.

I have Details.dvb added to the Startup Suite.
I have created a button and put it on a tool bar.
I have found where to put the code to start Details.dvb. Just don't know
what to put.
0 Likes
361 Views
4 Replies
Replies (4)
Message 2 of 5

arcticad
Advisor
Advisor
Create a Module and have the Module load your form.
---------------------------



(defun botsbuildbots() (botsbuildbots))
0 Likes
Message 3 of 5

Anonymous
Not applicable

Ya that is what I did.

So far my problems today have had simple
solutions.


style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
Create
a Module and have the Module load your form.
0 Likes
Message 4 of 5

Anonymous
Not applicable
Hi Larry,

Use lisp.

In it's simplest (and adequate for all purposes) form:


(vl-load-com)
(defun C:Fred()
(vl-vbarun "C:\\Whatever\\Whateveragain\\Myprogram.dvb!MyMacro")

)


This will load (if necessary) and run the MyMacro in the file

C:\\Whatever\\Whateveragain\\Myprogram.dvb

If the file is in a folder on the AutoCAD search path, then you don't
need the path, but is will be faster to load if you supply the path
rather than searching via the AutoCAD path tree.

With this, you should remove your dvb file from the startup suite.

Regards


Laurie Comerford

Larry wrote:
> Ya that is what I did.
> So far my problems today have had simple solutions.
>
> wrote in message news:6117230@discussion.autodesk.com...
> Create a Module and have the Module load your form.
>
0 Likes
Message 5 of 5

Anonymous
Not applicable
Ya I thought about doing it that way, so I don't have to have the .dvb
loaded at startup. No need to have acad loading a bunch of stuff at start
up. I will end up changing to a lisp before I finish it.

"Laurie Comerford" wrote in message
news:6117402@discussion.autodesk.com...
Hi Larry,

Use lisp.

In it's simplest (and adequate for all purposes) form:


(vl-load-com)
(defun C:Fred()
(vl-vbarun "C:\\Whatever\\Whateveragain\\Myprogram.dvb!MyMacro")

)


This will load (if necessary) and run the MyMacro in the file

C:\\Whatever\\Whateveragain\\Myprogram.dvb

If the file is in a folder on the AutoCAD search path, then you don't
need the path, but is will be faster to load if you supply the path
rather than searching via the AutoCAD path tree.

With this, you should remove your dvb file from the startup suite.

Regards


Laurie Comerford

Larry wrote:
> Ya that is what I did.
> So far my problems today have had simple solutions.
>
> wrote in message news:6117230@discussion.autodesk.com...
> Create a Module and have the Module load your form.
>
0 Likes