Assigning Macro's to control buttons.

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
 
H

Harald Staff

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
 
H

Harald Staff

You're welcome, glad it worked. Thanks for the feedback.

Best wishes Harald
Followup to newsgroup only please.
 
Top