How to Run a Macro with Custom Keyboard Shortcut in Excel
Follow the below steps to assign a keyboard shortcut to execute a Macro:
Step 1. Go to View >> Macros >> View Macros – to pop-up Macro dialogue box [keyboard shortcut – Alt+F8]
Step 2. Select Macro from the list (e.g. updateText) and Press “Options”, to pop-up Macro Options
Step 3. Give any specific text in shortcut key input [e.g. Ctrl+p] and Press “OK”. Close Macro list
Step 4. Just press your Shortcut key, e.g. Ctrl+p, to execute the macro.
How to Enable & Run a Macro in Excel? 6 Ways
We can record a macro in Excel or write from scratch in VB Editor. Excel provides different options to run a macro. In this article, we explore four different approaches to running a macro in an Excel application.
Even while executing an Excel macro is a straightforward process for seasoned users, it might not be clear to newbies. You will discover numerous ways to execute macros in this article, some of which may entirely alter the way you interact with Excel files.
The below macro will write the text “Geeks for Geeks” in cell B5
Sub updateText()
ActiveSheet.Range(“B5”).Value = “Geeks for Geeks”
End Sub
Contact Us