Microsoft Office Tutorials and References
In Depth Information
Recording Your First Macro
Take a moment to create buttons for the two macros (AddDataBars and RemoveDataBars) you
created earlier. Here’s how:
1. Click the Insert drop-down list under the Developer tab.
2. Select the Button Form control (see Figure 13-8).
3. Click the location you want to place your button. When you drop the button control into
your worksheet, the Assign Macro dialog box, shown in Figure 13-9, opens and asks you to
assign a macro to this button.
4. Select the macro that you want to assign. In this case, you can select the AddDataBars macro
and then click OK.
5. Repeat Steps 1 through 4 for the RemoveDataBars macro.
Figure 13-8: You can find the Form Controls in the Developer tab.
Figure 13-9: Assign a macro to the newly added button.
At this point, you have two buttons that run your macros. Keep in mind that all the controls in the
Forms toolbar work the same way as the Command button — you assign a macro to run when the
control is selected.
The buttons you create come with a default name, such as Button3. To rename your
button, right-click the button and then select Edit Text.
Search JabSto ::

Custom Search