Microsoft Office Tutorials and References
In Depth Information
Running macros when a button is clicked
click a shape, right-click the shape, and then click Assign Macro on the shortcut menu that
opens. In the Assign Macro dialog box, click the macro that you want to run when you click
the shape, and then click OK.
IMPORTANT When you assign a macro to run when you click a shape, don’t change the
name of the macro that appears in the Assign Macro dialog box. The name that appears refers
to the object and what the object should do when it is clicked; changing the macro name
breaks that connection and prevents Excel from running the macro.
In this exercise, you’ll add the View Macros button to the Quick Access Toolbar, add a macro
button to the Quick Access Toolbar, assign a macro to a workbook shape, and then run the
SET UP You need the PerformanceDashboard workbook located in the Chapter12
practice file folder to complete this exercise. Open the workbook, click the Enable
Content button on the Message Bar (if necessary), and then follow the steps.
On the Quick Access Toolbar , click the Customize Quick Access Toolbar button, and
then click More Commands . The Quick Access Toolbar page of the Excel Options
dialog box opens, displaying the Popular Commands category in the Choose
Commands From pane.
In the list of available commands, click View Macros .
Click Add to add the View Macros command to the Customize Quick Access
In the Choose commands from list, click Macros to display the available macros in
the pane below the list.
In the Choose commands from pane, click SavingsHighlight .