Datasheet
14
6
2
4
5
3
7
The Macro Options dialog box
appears.
4 Type the desired shortcut key.
Press Shift as you type to
assign an uppercase key.
5 Type a description.
6 Click OK to close the Macro
Options dialog box.
7 Click Close to close the Macro
dialog box.
Create a Keyboard Shortcut
1 Press Alt+F8.
The Macro dialog box appears.
2 Click the desired macro.
3 Click the Options button.
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 upper- 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 the
assigned upper- 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; for example,
Ctrl+m. To execute a macro you have assigned to an
uppercase letter, press Ctrl and Shift plus the letter; for
example, Ctrl+Shift+M.
If you give 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 and Launch a
Keyboard Shortcut
03_591598-ch01.indd 1403_591598-ch01.indd 14 6/11/10 1:41 PM6/11/10 1:41 PM