The Best Office Productivity Tools Kutools for Excel Solves Most of Your Problems, and Increases Your Productivity by 80% ![]() Please use the codes as below table showed. VBA code: Assign hotkey to specified macro Private Sub Worksheet_SelectionChange(ByVal Target As Range)Īpplication.OnKey "^ represents the ENTER key. In the opened Microsoft Visual Basic for Applications window, copy below VBA code into the Code window. Open the worksheet you want to run specified macro by hotkey, and then right click the sheet name, choose View Code from the context menu. You can also apply below VBA code to assign hotkey to specified macro in certain worksheet in Excel.ġ. In the Macro Options dialog box, specify a shortcut key in the Shortcut key box, and then click the OK button.įrom now on, when using the hotkey (in this case I press the Ctrl + p keys), the specified macro will run immediately.Īssign hotkey to specified macro with VBA code In the Macro dialog box, select the macro name you will assign hotkey, and then click the Options button.ģ. ![]() Click Developer > Macros to open the Macro dialog box.Ģ. ![]() Please do as follows to assign hotkey to specified macro in Excel.ġ. Amazing! Using Efficient Tabs in Excel Like Chrome, Firefox and Safari! Save 50% of your time, and reduce thousands of mouse clicks for you every day!
0 Comments
Leave a Reply. |