

You can export the module to see all the shortcut keys used. The G\n14 attribute means the macro is assigned to Ctrl+Shift+G.įigure 105. So, in Figure 105, the g\n14 attribute means the macro is assigned to Ctrl+g. The shortcut key is listed, followed by /n14. You see an attribute near each module.Excel proposes a name such as Module1.bas. Save the file in a place where you can find it later.Right-click the module in the Project Explorer and choose Export File.
#ASSIGN HOTKEY TO OUTLOOK MACRO CODE#
To permanently change the shortcut key via code, use:Īdditional Details: Excel stores the shortcut key in the code module, but it is not visible in the Visual Basic editor. To cancel this assignment and return Ctrl+m to its normal function, use: The following line of code temporarily assigns the MoveDown procedure to Ctrl+m: Perhaps you want to turn on a shortcut key during one section of a process and turn it off later in the process. Figure 104.Y ou can change the shortcut key using this dialog.Īdditional Details: You can temporarily assign a macro to a shortcut key by using a macro. You can edit the shortcut key here ( Figure 104). Click the macro in question and click the Options button in the Macro Options dialog. Solution: To change the shortcut key, press the F8 key to see a list of macros. However, changing the comment in the macro does not have any effect on the actual shortcut key used. Excel documents the shortcut key used when recording a macro in the comments at the top of the macro. Now you need to change the shortcut key used for the macro. Challenge: You recorded a macro but forgot to assign it to a shortcut key.
