Macros and UI
Macros and UI
is there a way to map a button to run a Macro ?
Re: Macros and UI
yes, simply put the name of the macro in the “Execute Command” property of the button. But note: this will only work when no other macro is working in that time and the macro is already available in the macro list.
regards
Michael
regards
Michael
Re: Macros and UI
I cannot get my VBS macro to run this way.
The macro is loaded in the Project Manager, and no other macro (that I know of) is currently running.
I also can't add the macro to the "macro list" because it says "this macro is already loaded".
In the “Execute Command” property of my button I put the macro's filename without extension, as shown in the Project Manager's "Macros" list.
Bonus question: how do I only run a specific function out of a VBS macro file?
The macro is loaded in the Project Manager, and no other macro (that I know of) is currently running.
I also can't add the macro to the "macro list" because it says "this macro is already loaded".
In the “Execute Command” property of my button I put the macro's filename without extension, as shown in the Project Manager's "Macros" list.
Bonus question: how do I only run a specific function out of a VBS macro file?
-
- Sales & Support
- Posts: 1083
- Joined: Fri 20. Sep 2019, 13:31
Re: Macros and UI
Hello,
You enter the name of a subroutine, not the Macro-File.
For example:
in the execute Command property you just enter the name of the subroutine:
(Notice: No Parenthesis, no Quotes).
Try again and let us know if it works now.
BR
Marvin
You enter the name of a subroutine, not the Macro-File.
For example:
Code: Select all
Sub doSomething()
PrintToOutputWindow "Hello!"
End Sub
Code: Select all
doSomething
Try again and let us know if it works now.
BR
Marvin
---
Marvin Heidemann
PEAK-Support Team
Marvin Heidemann
PEAK-Support Team
Re: Macros and UI
Thanks, this works.
I'll add that one has to use the complete name of the function including underscores (somewhere in the forum or documentation it was suggested that one has to remove the underscores).
I'll add that one has to use the complete name of the function including underscores (somewhere in the forum or documentation it was suggested that one has to remove the underscores).