Microsoft Office Tutorials and References
In Depth Information
Running macros when a button is clicked
dialog box, which saves a significant amount of time compared to when you display the
View tab and move the pointer to the far right edge of the ribbon.
If you prefer to run a macro without having to display the Macro dialog box, you can do
so by adding a button representing the macro to the Quick Access Toolbar. Clicking that
button runs the macro immediately, which is very handy when you create a macro for a
task you perform frequently. To add a button that represents a macro to the Quick Access
Toolbar, click the Customize Quick Access Toolbar button at the right edge of the Quick
Access Toolbar, and then click More Commands to display the Quick Access Toolbar page of
the Excel Options dialog box. From there, in the Choose Commands From list, click Macros.
Click the macro that you want represented on the Quick Access Toolbar, click Add, and then
click OK.
If you add more than one macro button to the Quick Access Toolbar or if you want to
change the button that represents your macro on the Quick Access Toolbar, you can select
a new button from more than 160 options. To assign a new button to your macro, click the
macro command in the Customize Quick Access Toolbar pane and click the Modify button
to display your choices. Click the symbol you want, enter a new text value to appear when a
user points to the button, and then click OK twice (the first time to close the Modify Button
dialog box and the second to close the Excel Options dialog box).
12
Finally, you can have Excel run a macro when you click a shape in your workbook. By
assigning macros to shapes, you can create “buttons” that are graphically richer than those
available on the Quick Access Toolbar. If you’re so inclined, you can even create custom button
layouts that represent other objects, such as a remote control. To run a macro when you
 
Search JabSto ::




Custom Search