Datasheet
15
Chapter 1: Using Macros and Form Controls
1
If you do not use a macro shortcut
frequently, it is easy to forget the
keyboard shortcut you assigned
to your macro. If you forget your
keyboard shortcut, you can view it
in the Macro Options dialog box.
•
The macro executes.
3 Repeat Steps 1 and 2 to execute
the macro again.
Note: In this example, the macro
removes the decimal places.
Launch a Keyboard Shortcut
1 Select the cells where you want
the macro to execute.
2 Press Ctrl and the shortcut key.
You can execute a macro by assigning the macro to a picture, clip art, a
shape, or smart art. For example, if you want to assign a macro to a
picture, you start by inserting the picture into your worksheet by clicking
the Insert tab and then clicking Picture. The Insert Picture dialog box
appears. In the Look In field, select the folder in which you stored the
picture you want to insert. The pictures in that folder appear. Click the
picture you want to insert and then click the Insert button. The picture
appears in the worksheet. Click and drag the picture to place it where you
want it and then double right-click the picture. A menu appears. Click
Assign Macro. The Assign Macro dialog box appears. Click the macro you
want to assign to the picture and then click OK. Excel assigns the macro to
the picture. Click the picture when you want to execute the macro.
03_591598-ch01.indd 1503_591598-ch01.indd 15 6/11/10 1:41 PM6/11/10 1:41 PM