Create And Launch A Keyboard Shortcut

Excel provides the option of keyboard shortcuts to allow you to quickly launch a command, or even a macro, from the keyboard by pressing a combination of keys. With the use of a keyboard shortcut, you can activate a macro by pressing both the Ctrl key and the macro's shortcut key. You assign keyboard shortcuts to a macro during the macro creation, or at any time after you create the macro. See the section "Record a Macro" for more information on creating a macro.

Keyboard shortcuts in Excel are case sensitive. Excel interprets a lowercase s and an uppercase S as two different keys. By using uppercase and lowercase letters, Excel provides more shortcut keys that you can assign to a macro. To execute a macro that has an uppercase letter for the key, such as M, you press Ctrl+Shift+M.

The downside to assigning shortcut keys to a macro is that you have to remember the assigned shortcut. If you forget your shortcut assignment for a selected macro, you can view it in the Macro Options dialog box, which you access via the Macro dialog box.

Excel allows you to assign any key as the shortcut for your macro. If Excel uses the same the key as a shortcut key for a standard Excel option, your shortcut definition overrides the Excel definition. For example, when you press Ctrl+O, Excel opens the Open dialog box, enabling you to select a workbook to open. If you create a shortcut key macro of o, your macro executes whenever you press Ctrl+O instead of displaying the Open dialog box. With this in mind, avoid using shortcut keys that you use for other common Excel tasks.

CREATE A KEYBOARD SHORTCUT

CREATE A KEYBOARD SHORTCUT

LQ On the Macro dialog box, click the desired macro.

Note: See the section "Run a Macro" for more on the Macro dialog box.

Insert Format

LQ On the Macro dialog box, click the desired macro.

■ You can click Tools O Macro O Macros to display the Macro dialog box.

Note: See the section "Run a Macro" for more on the Macro dialog box.

L0 Click Options.

■ The Macro Options dialog box displays for the selected macro.

L-H Type the desired shortcut key in the Shortcut Key box.

Insert Format

|| Arial

® * A. .

H15

Macro name'

A

B

Calculai pa

In

1

J

K

1

2

Rent

WRUR? Ma

ro name:

icel 1

3

January

Expense Calculate_Total

4

February

7(

Shortcut key:

Into 1

5

March

h

April

lit 1

7

May

7t

Description:

8

June

7i

Macro recorded 6/10/2001 by Jinjer Simon

ate 1

y

July

m

August

7i

ste 1

13

September

7

Macros ir

1

1 Cancel

1

«... 1

November

7

Description^

14

December

7

1ft

16

17

ie

19

'Ai

21

22

23

24

25

-

► h[\ Sheet

^Sheet2

M 1 >

Ready

■ When you type an uppercase character in the field, a message appears, reminding you to type Ctrl+Shift+shortcut key.

L-Q Click OK to save the shortcut key.

0 0

Post a comment