There are two ways to assign a shortcut key to a macro. You can assign a shortcut key when you are first recording your macro, or you can assign a short cut key to an existing macro.
To assign a shortcut to a macro when you record it, choose Tools->Macro->Record New Macro. When you see the Record Macro box, just enter a letter in the Short cut key data field.
Here you can see that the letter k has been assigned as a shortcut key for this macro (k is used as an example, but any letter will do). Once the macro has been recorded, Pressing Ctrl + k will run it.
If you save the macro in the personal macro workbook, the shortcut will be carried with it wherever you use the macro.
If you press Shift + k when you enter the short cut key, the short cut will then become Ctrl + Shift + K for the macro. You can see this change in the image on the left, under the words Shortcut key.
To assign a shortcut to an existing macro, choose Tools->Macro->Macros. In the Macro dialogue box, select the name of the macro you want to assign a shortcut key to, and then click the Options button.
Select the name of the macro from the list and click Options. This will open the Macro Options dialogue box for the macro you selected.
There is a small data field that can be used to enter a shortcut key for this macro. You can enter a letter, or use a shift key/letter combination as before.
If you click OK, the shortcut key will be assigned to the macro.
|