Assign Macro to Command Button

G

Guest

How do I assign a macro to a command button in Excel 2003. Previously it was
just a right-click away, but not any more:(

Thankx
 
R

Ron de Bruin

Hi adamaagard

You have add a button from the control toolbox instead one from the forms toolbar.

This button have a click event.
Double click on the button when you are in design mode and
enter the macro name in the click event
 
G

Guest

Hi,
i have xp but:
- for a CommandButton from the Control Toolbox toolbar, say CommandButton1,
you have to create an event sub in the sheet (or userform) containing the
control:
Private Sub CommandButton_Click( )
End Sub
- for a Button from the Forms toolbar, Right-Click on the button and choose
Assign Macro from the pop-up menu.
 

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

Top