Repeating VBA Macros

J Haag

Usenet Archive
Joined
Dec 22, 2003
Messages
1
Reaction score
0
Hola,

Does anyone know how to repeat a VBA macro assigned to a toolbar button by just hitting enter, the spacebar or right mouse button. Right now I have to select the toolbar button everytime I want to run the routine because If I try to repeat it any other way, just the "-vbarun" command executes and prompts for a macro name at the command line. Do I have to add some type of object method or property to my code to make it (the "-vbarun abcd.dvb!abcd" combination) stick in the command history. I'm using Autocad 2000.

Thanks for any help.

John
 
Create a LISP command wrapper for your VBA macro, and
call it from the menu:

(defun C:SOMECOMMAND
(vl-vbarun "Some.dvb!SomeMacro")
(princ)
)

In your menu macro, just place the name of the command:

[Button1]^c^cSOMECOMMAND
 

Latest threads

Back
Top