Excel Macros For Dummies
Book image
Explore Book Buy On Amazon
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 you work more efficiently when using the Visual Basic Editor.

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

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

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

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

About This Article

This article is from the book:

About the book author:

Dick Kusleika has been helping users get the most out of Microsoft Office products for more than 25 years through online forums, blogging, books, and conferences.

This article can be found in the category: