assigning macro to a button

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

all the help says right click on the button and select assign macro. When I right click on a button that is not an option. I am using office 2003. has this changed in this verion?

I have already recorded a macro and want to add a button to run it within the worksheet. I was able to add a toolbar button, but when I send this file, the button does not go with the file.

Help.
 
Hi Kelly

On a button from the Forms Toolbar you can right click and assign a macro

If you have a button from the control toolbox
Press the first button on the controltoolbox toolbar to go into the design
mode
Double click on the button you placed on your worksheet.
The VBA editor will open with this

Private Sub CommandButton1_Click()

End Sub

You can place the code in the event or place the macroname in the event.
Press Alt-q to go back to Excel and press the first button on the
controltoolbox again to exit the design mode


--
Regards Ron de Bruin
http://www.rondebruin.nl


Kelly said:
all the help says right click on the button and select assign macro. When I right click on a button that is not an option. I am
using office 2003. has this changed in this verion?
I have already recorded a macro and want to add a button to run it within the worksheet. I was able to add a toolbar button, but
when I send this file, the button does not go with the file.
 
Sure it's not from the control toolbox toolbar?

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

Kelly said:
all the help says right click on the button and select assign macro. When
I right click on a button that is not an option. I am using office 2003.
has this changed in this verion?
I have already recorded a macro and want to add a button to run it within
the worksheet. I was able to add a toolbar button, but when I send this
file, the button does not go with the file.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top