A List of 50 VBA Shortcut Keys for Excel [Free PDF Download]
Excel VBA is a powerful tool for automating and streamlining repetitive tasks in Excel. One of the best ways to increase your productivity in VBA is to learn and use keyboard shortcuts. With keyboard shortcuts, you can perform common tasks more quickly and efficiently, saving time and reducing the risk of errors. In this article, I’ve listed the top 50 useful Excel VBA shortcut keys, organized by category. Also, you can download a free PDF version of the list to keep them handy.
Download VBA Shortcut Keys for Excel
List of 50 VBA Shortcut Keys for Excel
1. Navigation
These shortcut keys will help you quickly move around the VBA Editor and navigate through your code. They will allow you to move to specific sections of your code, jump between procedures, and find specific variables or functions.
Shortcut Keys | Task |
---|---|
Alt + F11 | Switches between the Excel window and the Visual Basic Editor (VBE) window. |
Ctrl + Down Arrow | Moves to the first line of the next procedure. |
Ctrl + Up Arrow | Moves to the first line of the previous procedure. |
Ctrl + Page Down | Jumps to the beginning of the next procedure. |
Ctrl + Page Up | Jumps to the beginning of the previous procedure. |
Shift + F2 | Jumps to the selected function or variable. |
Ctrl + Shift + F2 | Jumps to the last position. |
Ctrl + Home | Jumps to the beginning of a module. |
Ctrl + End | Jumps to the end of a module. |
Ctrl + Right Arrow | Moves the cursor one word to the right. |
Ctrl + Left Arrow | Moves the cursor one word to the left. |
End | Moves the cursor to the end of the line. |
Home | Moves the cursor to the beginning of the line. |
Up Arrow | Moves the cursor upward by one line. |
Down Arrow | Moves the cursor downward by one line. |
Right Arrow | Moves the cursor one character to the left. |
Left Arrow | Moves the cursor one character to the right. |
2. Selection
These shortcut keys will help you edit and modify your code quickly and easily. They will allow you to select texts and work with them, expand selection, etc.
Shortcut Keys | Task |
---|---|
Ctrl + A | Selects all texts in the current module. |
Ctrl + Shift + End | Extends the selection to the end of the current procedure or module. |
Ctrl + Shift + Home | Extends the selection to the beginning of the current procedure or module. |
F4 | Displays the Properties window for a selected object. |
Ctrl + C | Copies the currently selected texts. |
Ctrl + E | Exports the currently selected module. |
Ctrl + X | Cuts out the currently selected texts. |
Ctrl + Insert | Copies the current selection. |
3. Debugging and Execution
These shortcut keys are used during the debugging process to help you identify and fix errors in your code. They will allow you to step through your code line by line, add breakpoints, and control the flow of execution.
Shortcut Keys | Task |
---|---|
F5 | Executes the current block of code or resumes execution from the last pause point. |
Ctrl + Break | Stops the execution of the code that’s currently running. |
F8 | Enters the debugging mode and executes one line of code at a time. |
Ctrl + F8 | Executes code up until the line containing the cursor. |
Shift + F8 | Skips over the current line while in debug mode. |
Ctrl + Shift + F8 | Steps out of the procedure. |
F9 | Toggles a breakpoint on or off on the current line. |
Ctrl + Shift + F9 | Removes all breakpoints from the current module. |
4. Miscellaneous
These shortcut keys are useful for working within the Visual Basic Editor (VBE) window in Microsoft Excel. They will allow you to switch between Excel window and Visual Basic Editor, indent code, access properties and methods of objects, etc.
Shortcut Keys | Task |
---|---|
Tab | Indents the current line. |
Shift + Tab | Removes the indent from the current line. |
Ctrl + J | Displays a list of properties and methods for the selected object. |
Enter | Creates a new line. |
Shift + F10 | Displays the active window’s context menu, similar to right-clicking. |
Ctrl + R | Opens the Project Explorer to view open VBA projects and objects. |
Ctrl + G | Opens the immediate window to execute code interactively. |
Ctrl + F | Finds text in the current module. |
Ctrl + H | Replaces text in the current module. |
Ctrl + Y | Redoes the last action that was undone. |
Ctrl + Z | Undoes the last action. |
Ctrl + J | Lists the properties/methods/members. |
Ctrl + M | Imports file. |
Alt + A | Opens the Add-Ins menu. |
F2 | Opens the Object Browser to browse VBA objects and properties. |
F1 | Opens the VBA Help window for information on VBA functions and syntax. |
F7 | Activates the open module window for viewing and editing code. |
Conclusion
Learning and using Excel VBA shortcut keys is a great way to increase productivity and efficiency in Excel. By taking advantage of these shortcuts, you can perform common tasks more quickly and easily. So why not start incorporating these time-saving techniques into your VBA workflow today?