Control button / macro
Le'ts assume your macro is named "myFavoriteMacro" and you want to do
things very, very simply.
On your worksheet, double-click the control button. This will pop-up
the VBE environment with some code pointing to your command button. It
will look something like:
Private Sub CommandButton1_Click()
End Sub
All you need to do is put in the line "Call myFavoriteMacro" before
the "End Sub" and you're there.
HTH
/ Tyla /
On Feb 10, 5:57 pm, Sarah wrote:
Hi there,
I have a control button on a spreadsheet. And I have a macro already
written. How do I attach that macro to the button without having to write or
copy the macro code into the control code? I'm really bad at writing that
stuff and I think I am messing up the syntax so wondered if there was an
easier way.
Thanks!
|