This article is part of my series: Excel VBA & Macros – A Step by Step Complete Guide.
Assigning a macro to a shortcut key
When you start recording a macro, the Record Macro dialog box appears shown in the following figure.
You can provide a shortcut key for your macro in the Shortcut key field.
Read More: How to Assign a Macro to a Button in Excel
Changing the shortcut key assigned to a macro
Here we’re demonstrating what to do if you have decided to change the shortcut key or provide a shortcut key if you didn’t assign before:
- Choose Developer ➪ Code ➪ Macros (or press Alt+F8). The Macro dialog box appears.
- Select the macro name from the list.
- Click the Options button. The Macro Options dialog box shown in the following figure appears.
- Specify the shortcut key. Use a single letter (for a Ctrl+letter shortcut), or press Shift and enter an uppercase letter (for a Ctrl+Shift+letter shortcut).
- Click OK to return to the Macro dialog box.
- Click Cancel to close the Macro dialog box.
Happy Excelling 🙂