Starting a macro with a button

Comprehensive CAN monitor for Windows® and its add-ins: Plotter, CANdb Import, Instruments Panel, and J1939
Post Reply
hilde73
Posts: 4
Joined: Fri 18. Nov 2011, 13:50

Starting a macro with a button

Post by hilde73 » Fri 18. Nov 2011, 14:01

I wrote a macro to send CAN messages to a IPETRONIK Vout module. The project should be usefull for other people in my company so I wanted to greate an easier way to start the macro. Is it possible to use one of the buttons from the panel to start a VBA macro ?
Thanks in advance.
Carsten

M.Maidhof
Support
Support
Posts: 1751
Joined: Wed 22. Sep 2010, 14:00

Re: Starting a macro with a button

Post by M.Maidhof » Fri 18. Nov 2011, 14:14

Hello,

yes, it is possible to use a button of the panel to start a macro. Simply set the name of the macro in the properties->Execute Command option of the button. The macro must be available in the macro list.

best regards

Michael

PMJ
Posts: 13
Joined: Mon 9. Jan 2012, 12:44

Re: Starting a macro with a button

Post by PMJ » Mon 16. Jan 2012, 11:59

Hi,
What is the correct syntax for the command caller "sample.mcr" for the button.
I try enter i the execute comand field:
macrorun sample
macrorun sample.mcr
sample.mcr
sample
sample.mcr macrorun
sample macrorun.
I don't know wher is a problem.

Piter

G.Lang
Support
Support
Posts: 169
Joined: Wed 22. Sep 2010, 14:58

Re: Starting a macro with a button

Post by G.Lang » Tue 17. Jan 2012, 08:06

Hi,

if your macro is called "example_123.mcr" then you must use the syntax "example123" in the execute command field. Don´t forget to switch from the "Design Mode" into the "Run Mode" otherwise the panel don´t work.

regards
Gunther

Post Reply