Making the macro available

At this point, everything should be working properly. But you still need an easy way to execute the macro. Assign a shortcut key (Ctrl+Shift+C) that executes the ChangeCase macro:

1. Activate the Excel window via Alt+F11.

2. Choose ToolsOMacroOMacros or press Alt+F8.

3. In the Macros dialog box, select the ChangeCase macro.

4. Click the Options button.

Excel displays its Macro Options dialog box.

5. Enter an uppercase C for the Shortcut key.

See Figure 16-7.

6. Enter a description of the macro in the Description field.

8. Click Cancel when you return to the Macro dialog box.

Figure 16-7:

Assign a shortcut key to execute the Change-Case macro.

Figure 16-7:

Assign a shortcut key to execute the Change-Case macro.

After you perform this operation, pressing Ctrl+Shift+C executes the ChangeCase macro, which displays the custom dialog box if a range is selected.

0 0

Post a comment