You can add actions to a button. First add an action that sets the value of a variable. Next add an action that executes a macro. The macro will have to use the variable. You cannot directly pass a value to a macro, so that's why you need to use a variable.