Microsoft Office Tutorials and References
In Depth Information
RUN A MACRO FROM A BUTTON
Method 1: Forms Button
To run a macro from a forms button, in Excel 2003, select View, Toolbars,
Forms. Click the Button icon (Figure 107) and then drag in the worksheet to
draw a button.
Figure 107. h is is how you create the forms but on
in Excel 2003 and earlier.
In Excel 2007, go to the Developer tab. Open the Insert dropdown and choose
the icon shown in Figure 108. Drag a rectangle on the worksheet to draw your
Figure 108. If you can’t i nd the Developer tab in
Excel 2007, use Oi ce Icon, Excel Options, Popular,
Show Developer Tab in the Ribbon. h e Insert
dropdown then of ers the forms but on.
The Assign Macro dialog appears. Click your macro and then click OK.
The button initially appears with the generic name Button 1. To change the
name: Ctrl+click the button to select the button without running the macro. The
button is surrounded by dots. Drag across the words on the button to select
them for editing. The button is now surrounded by diagonal lines. Type new