Datasheet

Create and Launch a
Keyboard Shortcut
A
keyboard shortcut is a combination of keys you
press to execute a command. You can use a
keyboard shortcut to launch an Excel macro
command. You can assign an uppercase or lowercase key
to a macro when you create it, or assign one later by
using the Macro Options dialog box. You execute a macro
keyboard shortcut by pressing the Ctrl key along with
that uppercase or lowercase key. Refer to the section,
“Record a Macro,” to learn how to create a macro.
Keyboard shortcuts are case sensitive. For example, Excel
interprets a lowercase m and an uppercase M as two
different keys. To execute a macro you have assigned to
a lowercase letter, press Ctrl plus the letter, such as
Ctrl+m. To execute a macro you have assigned to an
uppercase letter, press Ctrl and Shift plus the letter, such
as Ctrl+Shift+M.
If you assign the same keyboard shortcut to macros in
two different workbooks, you may execute the wrong
macro if you use the shortcut while you have both
workbooks open. Excel cannot discern from which
workbook you want the macro. You can use the Macro
Options dialog box to reassign one of the conflicting
macros to a new key.
You should also be careful not to assign the macro to a
keyboard shortcut that Excel uses. If you do, Excel
executes your macro instead of the command it created.
For example, by default, Ctrl+o opens the Open dialog
box. If you assign o to a macro, your macro overrides
Excel’s assignment.
CREATE A KEYBOARD SHORTCUT
1 Click the Developer tab.
2 Click Macros in the Code group.
The Macro dialog box appears.
3 Click the desired macro.
4 Click Options.
3
1
4
2
7
5
6
8
Plain Money Format
Create and Launch a Keyboard Shortcut
14
The Macro Options dialog box appears.
5 Type the desired shortcut key.
Press Shift as you type to assign an uppercase key.
6 Type a description.
7 Click OK.
8 Click Close to close the Macro dialog box.
04_132302 ch01.qxp 7/27/07 9:20 PM Page 14