Shortcut Keys

When assigning a shortcut key remember the letter you press is case sensitive. The default uses the Ctrl key. You can hold down the Shift key when selecting your key.
This does not have to be done when you record the macro and can easily be done afterwards.
You can add either a Shortcut Key or a Description to your macro by selecting (Tools > Macro > Macros) and selecting the "Options" button at the bottom.
If you add a description before recording a macro then this description will appear as a comment on the first few lines of the recorded VBA code.
Remember that any key combinations you assign to macros will take precedence over any built-in shortcut keys.
Shortcut keys are case sensitive and you can use just the Ctrl key or a combination of both the Ctrl key and Shift key.
This will invoke the shortcut Ctrl + Shift key. It is important to realise there is a good chance you will be overwriting an existing shortcut key so test first to make sure you will not miss it. Avoid overwriting common shortcut keys such as (Ctrl + "C" or Ctrl + "V").
If you enter "b" in lowercase. You can execute the macro by pressing (Ctrl + "b"). If you enter "B" in uppercase you can execute the macro by pressing (Ctrl + Shift + "b").
You can add or change a short-cut key at any time. You don't have to set this before recording your macro.
The Descriptive box can be used to add a short description to your macros and is only visible in the (Tools > Macros > Macro) dialog box when the macro is selected.
You could run your macro by using a shortcut key. Shortcut keys are case sensitive.
Select (Tools > Macro > Macros) to display the Macro dialog box.
Select the macro that you want to assign a shortcut key to and press the "Options" button.

alt text

The shortcut key must be a letter. You can either use just the Ctrl key or a combination of both the Ctrl key and the Shift key.
(e.g. Ctrl + " r " or Ctrl + Shift + " R ").
To create a shortcut key that includes the Shift key just press the Shift key while you press the letter.
Any shortcut key that you assign to a macro will take precedence over the built-in shortcut keys, so be careful.
It is possible to assign the same shortcut key to more than one macro in the same workbook using the (Tools > Macro > Macros) dialog box.
You cannot assign the same shortcut key though from the Record Macro dialog box.
If there are any macros that have the same shortcut key assigned, the macro that appears first alphabetically will be run.
If you forget to assign a shortcut key you can always do it at a later date by using the Options button on the (Tools > Macro > Macros) dialog box.


If you have two Workbooks or Documents open that contain macros assigned to the same shortcut keys then the macro that will be run is the one that is first alphabetically in the list of available macros.
If one has been assigned using the Options button.
SS



© 2024 Better Solutions Limited. All Rights Reserved. © 2024 Better Solutions Limited TopPrevNext