TechRepublic : A ZDNet Tech Community

Microsoft Office

Host: Susan Harkins
Contact

37 keyboard shortcuts for moving faster in the Visual Basic Editor

The Visual Basic Editor (VBE) is the development environment in the Microsoft Office applications. Here are some handy keyboard shortcuts you can use to work more efficiently while entering, viewing, and editing code.

Note: This list is also available as a PDF download.

The shortcuts

General
Alt + F11 This toggles switch displays the VBE from the application window and vice versa.
Ctrl + G Displays the Immediate window.
Ctrl + F Opens the Find dialog box.
F3 Finds Next.
Shift + F3 Finds Previous.
Ctrl + H Opens the Replace dialog box.
Ctrl + Z Cancels the last keyboard stroke or the last mouse operation (when possible).
F5 Runs the current procedure or continues execution after pausing.
Ctrl + Break Halts a procedure.
Shift + F5 Terminates a procedure and resets all variables to their default values.
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 Gives focus to the open module window.
Code module
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.
Ctrl + Shift + F2 Goes to the last position.
Ctrl + Home Goes to the beginning of module. (Also in the Immediate window.)
Ctrl + End Goes to the end of module. (Also in the Immediate window.)
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.
Ctrl + Y Deletes the current line.
Ctrl + Delete Deletes to the end of a word.
Ctrl + Shift + F9 Clears all breakpoints.
Project Explorer
F7

Shift + Enter

Opens the selected file’s module.
Home Selects the first file in the list.
End Selects the last file in the list.
Right arrow Expands a sublist.
Left arrow Collapses a sublist.
Up arrow Moves up the list one item at a time.
Down arrow Moves down the list one item at a time.

Print/View all Posts Comments on this blog

Ctrl WinKey Backspace P bboyd@... | 08/05/09
What's it do? ssharkins@... | 08/06/09
Control key pressed just raises a Flag ... mw00110011 | 08/17/09
Ctrl Y: Most annoying shortcut inconsistency ever ghall@... | 08/11/09
RE: Keyboard shortcuts for the Visual Basic Editor jswed | 08/12/09

What do you think?

White Papers, Webcasts, and Downloads

Recent Entries

TR on Twitter

Archives

TechRepublic Blogs



500 Things Every Technology Professional Needs to Know
Did you know Microsoft's RegClean does not work with XP but you can use shareware to clean your registry? Did you know most wireless access points don't have encryption enabled by default? Did you know there are 500 tidbits of information contained in TechRepublic's 500 Things Every Technology Professional Needs to Know that will help you become a successful IT professional.
Buy Now
Quick Reference: Linux Commands
Reduce stress and speed up resolutions with the easiest command references right at your fingertips. You'll receive a PDF file covering Linux, packed with the most common commands you'll need and use daily.
Buy Now

SmartPlanet

Click Here