Hello Excellers, time for some back to basics today with Excel Macros. Let’s take a look at assigning or changing a shortcut key with a Macro.
Let’s Go Over The Basics.
When you start recording a Macro with the Macro recorder, the Dialog Box appears and has a space for a Shortcut Key to be assigned to the Macro so it can be run quickly with the keyboard shortcut.
See my example below. I have assigned the keyboard shortcut Ctrl+Shift+T to my Macro called Macro1.
So not only does your Keyboard Shortcut get displayed in the Macro Recorder Dialog Box it is also visible in the Visual Basic Editor screen.
How To Change The Keyboard Shortcut Key Assigned To Your Macro.
If you decide to change the Shortcut Key, it is simple to do.
- 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 opens
- Change the letter for the Shortcut Key
- Hit Ok
Do You Want To Learn More Cool VBA Stuff?
If you want to see all of my blog posts in the Macro Mondays Series you can find them all in the link below. Why not book mark it?, Yes it is updated EVERY Monday.
You can also download the corresponding example workbook that contains the Macro code by clicking on the download button below.