0

I have created a macro and a button but I can't see where to edit the button setting to invoke the macro. I'm using Excel 2003.

1
  • What kind of button is it? ActiveX or Form Control? If you are not sure then, how did you add the button? From the forms toolbar or the control toolbar? Commented May 16, 2012 at 18:09

1 Answer 1

4

If you've used a Form Control. The chance to assign a macro will come up right after you add the button to the sheet. Or, if the button is already on the sheet, you can right-click on it and select Assign Macro.

If you've used an ActiveXControl, right-click on the button and select View Code. This will open up the VBE with

Private Sub myCommandButtonName_Click() 

End Sub

From this sub call your macro like so...

Private Sub myCommandButtonName_Click() 

Call myMacro

End Sub
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.