Assigning Macro's to control buttons.

  • Thread starter Thread starter catdataman
  • Start date Start date
C

catdataman

Many moons ago I use to know how to do this - I can remember how t
record the macro - but despite all my efforts I can not link the macr
to a control button.

I am using Excel 2003

Any help would be gratefully received - and it is christmas

Thanks

Catdatama
 
Hi

Those buttons are from the Forms toolbar -rightclick them and assign macro.
Or you can use almost any shape from the drawing toolbar as a clickable
button, rightclick and assign macro. For the Control Toolbox buttons, they
have code already. Rightclick, choose "view code" and call your macro from
there:

Private Sub CommandButton1_Click()
Call Macro1
End Sub
 
You're welcome, glad it worked. Thanks for the feedback.

Best wishes Harald
Followup to newsgroup only please.
 

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