Excel Tip: Assign a Macro to a Button on Your Toolbar
Follow these steps and you'll be clicking a macro button in no time:
1. Choose Tools | Customize, from the menus. The Customize window will appear. Click the Commands tab if it is not already selected.
2. Click Macros from the Category list at the left. Two options will appear in the Commands section at the right: Custom Menu Item and Custom Button (you may not have the Custom Button option, depending on which version of Excel you have - no matter).
3. Hold down your mouse button and drag the Custom Button (or Custom Menu Item if that is all you have) right out of the Customize window and onto your toolbar, in the place where you want the button to appear. Release your mouse button to drop the item onto your toolbar.
4. Click the Modify Selection option in the Customize window. A menu will appear.
5. Click the Assign Macro option and choose a macro from the Assign Macro window that appears. You should always choose a macro that resides in the Personal Workbook for placement on a toolbar - that way the macro will be available in every workbook. If it is not already selected, select the Personal Workbook from the Macros in option in the Assign Macro window. Click OK when you have highlighted a macro.
6. If you would like to change the button image to a different picture, click the Modify Selection option again and choose to Edit or Change button image. Choosing Edit lets you design your own image, choosing Change produces a gallery of images from which you may select.
Note: If your macro button is a text button instead of a figure button, select Default Style from the Modify Selection menu to change to style to a figure, then choose Edit or Change to customize the image on the button.
7. Click Close when you are finished with the Customize window. Henceforth your new button will activate the macro with which it is associated.