Assign Button to Macro in Excel

Hello Experts,

Can someone tell me how to assign a menu button to a macro? At present, I've assigned a short-cut key to a macro, but I would like assign a button so that I can click it to activate the macro.


Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

What version of excel are you using?  If 2007 or later then the following link provides instructions for adding a custom button to the ribbon toolbar.

Steven CarnahanNetwork ManagerCommented:
The question I would ask is are you talking about a button on the ribbon bar or a button in the spreadsheet? If it is the ribbon bar then tnayak has pointed you in the correct direction. If you want a button in the spreadsheet then you need to create the button and then go into it's properties and set the macro to it.
Carlton - the attached link discusses briefly the steps for doing this, but I'll try to give you a bit more picturesque response!  

From researching your past questions, I know you have at least Excel 2007.  So, from the DEVELOPER's tab, find the CONTROLS group and click on INSERT which gives you some dropdown options.  You can select the button (FORMS control) which should be the top-left button-like icon on that menu.

Your mouse icon will look like a + and you can click and drag onto your worksheet to create the button (which can be later resized).  Immediately, there will be a popup prompting you to select a macro to assign the button to.  Hit Ok to make the connection between the button and a macro (PS - you can also assign macros to shapes - e.g., draw a rectangle or circle and right click to see the Assign Macro option)

You can then right click on the button and edit the text to label what the command button is for, grab the handles to adjust size, move it, etc.

See the images below which align with the steps as I articulated them.



Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Rory ArchibaldCommented:
Simple way: right click the Quick Access Toolbar above the Ribbon, choose 'Customise Quick Access Toolbar' change the 'Choose commands from' dropdown to macros, then choose the macro and click Add.
cpatte7372Author Commented:
Cheers guys
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.