Cheat Sheet

Excel Macros For Dummies Cheat Sheet

From Excel Macros For Dummies, 2nd Edition

By Michael Alexander

Excel shortcut keys allow you to perform certain tasks using only the keyboard. The idea being that you increase your efficiency when you limit the number of instances your hands have to move back and forth from the keyboard to the mouse. Getting in the habit of using these shortcut keys can help work more efficiently when using the Visual Basic Editor.

Excel Macros: Standard Visual Basic Editor Shortcut Keys

What to Press on Your Keyboard What It Does
Alt + F11 Toggles between the VBE and Excel windows
Shift + F10 Displays the active window’s shortcut menu
Ctrl + R Opens the Project Explorer
F4 Opens the Properties window
F2 Opens the Object Browser
F1 Opens VBA Help
F7 Activates the open module window

Excel Macros: Shortcut Keys for Working in the VBE Code Window

What to Press on Your Keyboard What It Does
Ctrl + Down Arrow Selects the next procedure
Ctrl + Up Arrow Selects the previous procedure
Ctrl + Page Down Shifts one screen down
Ctrl + Page Up Shifts one screen up
Shift + F2 Goes to the selected function or variable
Ctrl + Shift + F2 Goes to the last position
Ctrl + Home Goes to the beginning of module
Ctrl + End Goes to the end of module
Ctrl + Right Arrow Moves one word to the right
Ctrl + Left Arrow Moves one word to the left
End Moves to the end of the line
Home Moves to the beginning of the line
Tab Indents the current line
Shift + Tab Removes the indent for the current line
Ctrl + J Lists the properties and methods for the selected object

Excel Macros: Shortcut Keys for Debugging Code

What to Press on Your Keyboard What It Does
F5 Runs the current procedure or continues after pausing
Ctrl + Break Halts the currently running procedure
F8 Goes into debug mode and executes one line at a time
Ctrl + F8 Executes code up until the cursor
Shift + F8 Steps over the current line while in debug mode
F9 Toggles a breakpoint for the currently selected line
Ctrl + Shift + F9 Clears all breakpoints
Alt + D + L Compiles the current Visual Basic project

Excel Macros: Shortcut Keys for Navigating the VBE Project Window

What to Press on Your Keyboard What It Does
Up arrow Moves up the project list one item at a time
Down arrow Moves down the project list one item at a time
Home Moves to the first file in the project list
End Moves to the last file in the project list
Right arrow Expands the selected folder
Left arrow Collapses the selected folder
F7 + Shift + Enter Opens the code window for the selected file