Input Parameters
Calling the Same Macro
You might want to include a button that can be used as a toggle.
For example the following button can be used to toggle between sorting ascending and descending.
Passing Parameter Values
For simple VBA macros you can use the Parameter and Tag properties to store information to be passed to the OnAction macro.
If you have more than two items of information to pass it is more convenient to use a macro procedure that has input parameters.
For example if you wanted to pass a product name, cost and selling price to the following macro.
To execute this macro from a commandbar you need to assign the following code to the OnAction property of the control.
The entire expression is enclosed in single quotes.
Any string parameter values within the expression are enclosed in double quotes
© 2026 Better Solutions Limited. All Rights Reserved. © 2026 Better Solutions Limited TopPrevNext