G Guest Jul 21, 2007 #1 I know how to design a button, and I know how to record a macro but I can't figure out how to attach the macro to the button?
I know how to design a button, and I know how to record a macro but I can't figure out how to attach the macro to the button?
D David Hilberg Jul 21, 2007 #2 Are you using xl2003 or earlier? Is the button on a command bar (not embedded in a sheet)? If yes to both: Tools > Customize Right Click the button Choose "Assign Macro" - David
Are you using xl2003 or earlier? Is the button on a command bar (not embedded in a sheet)? If yes to both: Tools > Customize Right Click the button Choose "Assign Macro" - David
G Guest Jul 22, 2007 #4 One way to do it is to call it via the click event: Private Sub CommandButton1_Click() 'Or whatever name myMacro 'Your macro name here if it is in the standard module End Sub If your macro is in a sheet you might have to use Run (macro name)
One way to do it is to call it via the click event: Private Sub CommandButton1_Click() 'Or whatever name myMacro 'Your macro name here if it is in the standard module End Sub If your macro is in a sheet you might have to use Run (macro name)