Repeat VBA macro commands by right mouse click.

Repeat VBA macro commands by right mouse click.

Anonymous
Not applicable
1,076 Views
3 Replies
Message 1 of 4

Repeat VBA macro commands by right mouse click.

Anonymous
Not applicable
I have a problem with repeat VBA macro commands by right mouse click.

For Example: if we send a command “L” to draw a line, it does repeat if right mouse click again. In VBA macro, Suppose a macro name “test” and macro command under the Manu is “^C^C^C^C_-VBARUN test” so test macro run when I click on the Manu however it’s NOT repeat if we right click of mouse after one operation. Its repeat only till VBARUN & ITS LOST MACRO NAME "test"

Could you please help me to resolve this problem?

I would be greatly appreciated for your help in this stage.
0 Likes
1,077 Views
3 Replies
Replies (3)
Message 2 of 4

arcticad
Advisor
Advisor
You need to place the link into a command

{code}
(defun C:test ()
(vl-vbarun "myModule.test")
(princ)
)
{code}
---------------------------



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

Anonymous
Not applicable
Hi Many thanks for reply. Its mean I need to write a LISP program to run VBA macro? I need by mouse right click last VBA commad will repeat ....
0 Likes
Message 4 of 4

arcticad
Advisor
Advisor
Yes the command will repeat. the c: tells autocad this is a command.
you can then use your macro to call the command ^c^ctest

You can put all the commands into a .lsp file and load them with appload. put them in the startup suite briefcase.
---------------------------



(defun botsbuildbots() (botsbuildbots))
0 Likes