Exploring each VBA Editor Menu in Excel

Photo of person wearing a cap staring at a menu board shot by Levi Elizaga on Unsplash
Photo by Levi Elizaga on Unsplash
To master Excel VBA you'll have to get comfy in its coding dojo, the VBA Editor. Here, you'll delve into the VBA Editor Menu Bar and its trove of menus.

In this article:

9 minutes read

This article is part of the Visual Tour of Excel’s Coding Dojo series, exploring each of the Excel VBA editor’s menus, toolbars, and windows. Here, we’ll take a close look at each VBA editor menu in Excel.

“I don’t want to hear the specials. If they’re so special, put ’em on the menu.”

Jerry Seinfeld

If you wish to skip to any of the other posts in the series, click on any of the topics listed below:

Meet your Mat! The VBA Editor

Most great martial artists first had to get intimate with their dojo. Likewise, to master Excel VBA, you’ll have to get comfy loitering in its coding dojo, the VBA Editor. Naturally, the first step is to open the VBA editor.

“The Dojo is the only place you can die and come back to life, so use it.”

kyoshi Larry Mabson (American karateka)

I, for one, know how daunting the Excel VBA editor can appear to beginners – just take a look at the overview below! However, looks can be deceiving; at least that’s true here. I say that because anyone familiar with programming IDEs will tell you that the VBA editor is one of the more user-friendly IDEs out there.

IDE stands for Integrated Development Environment. They are software that consolidates application development tools.

Laying out the different areas and windows of the Excel VBA Editor (VBE)
Laying out the different areas and windows of the Excel VBA Editor (VBE)

Most developers only use a few of the VBA Editor’s menus, toolbars, and windows. As a result, they miss out on several tools that would make their work less stressful and enhance their productivity.

But you are not most developers, are you? For one thing, you are here, so I take it you would like to max out your VBA programming potential. Brilliant! You are well on your way there.

Excel VBA Editor’s Menu Bar

The Excel VBA Editor Menu bar is a horizontal collection of drop-down menus. Its purpose is to provide quick access to most of the editor’s essential features. These menus are similar to the Ribbon menus in Excel or other Microsoft Office applications.

Menus and some of their items have keyboard shortcuts (a.k.a. accelerator keys or hotkeys) that simplify and quicken their use. To access each menu, you can either click its tab or press the keyboard shortcut, Alt + “first letter of the menu’s name.”

A birds-eye view of each menu in the VBA Editor Menu bar follows below. As you’ll see from the accompanying images, the purpose of most (if not all) the menu items (i.e., options in the dropdown of each menu) is evident from their names.

Excel VBA Editor’s File menu

This VBA editor menu allows you to perform file-related actions such as saving, importing and exporting, deleting, printing, and closing files.

The Excel VBA Editor's File Menu
The Excel VBA Editor’s File Menu
CommandDescription
Save Book1Saves the active workbook (or project) and all its forms and modules. You can also use the "Ctrl + S" keyboard shortcut to do this.
Import FileOpens the Import File dialog box and allows you to include an existing module or form in your project. You can also use the "Ctrl + M" keyboard shortcut to do this.
Export FileOpens the Export File dialog box and allows you to extract the active module or form to an external project. You can also use the "Ctrl + E" keyboard shortcut to do this.
Remove Sheet1Should be used with great care as it permanently erases the active sheet, module or form.
PrintOpens the Print dialog box from which you can print the active module or form. You can also use the "Ctrl + P" keyboard shortcut to do this.
Close and Return to Microsoft ExcelDoes precisely what its name implies. It hides the VBA editor while retaining its state (content and settings) in memory.

Excel VBA Editor’s Edit menu

With this VBA editor menu, you can access several options related to making changes or retrieving changes to your work.

The Excel VBA Editor's Edit Menu
The Excel VBA Editor’s Edit Menu
CommandDescription
UndoRestores the last action, however, Cut and Copy operations in the Code window can't be undone. You can also use either "Ctrl + Z" or "Alt + Backspace" keyboard shortcuts to do this.
RedoRestores your last action, and you can use it to retrieve your previous 20 actions.
CutCopies the selected text to the clipboard while deleting it from its current location. You can also use either "Ctrl + X" or "Shift + Delete" keyboard shortcuts to do this.
CopyClones the selected text to the clipboard while retaining it in its current location. You can also use either "Ctrl + C" or "Ctrl + Insert" keyboard shortcuts to do this.
PasteImplants the clipboard's content into the location you selected. You can also use either "Ctrl + V" or "Shift + Ins" keyboard shortcuts to do this.
ClearRemoves the selected text. You can also use the "Del" key to do this.
Select AllSelects the active Code window's entire contents or all the controls on a form. You can also use the "Ctrl + A" keyboard shortcut to do this.
FindOpens the Find dialog box and allows you to search for a specific text. You can also use the "Ctrl + F" keyboard shortcut to do this.
Find NextOpens the Find dialog box (if not already displayed) and allows you to search for the next occurrence of a specific text starting from a selected location in the active Code window. You can also use the "F3" key to do this.
ReplaceOpens the Replace dialog box and allows you to search for a specific text in the active Code window and replace it with another text. You can also use the "Ctrl + H" keyboard shortcut to do this.
Indent and OutdentShifts a code line, or a block of code lines, to the next tab stop or the previous tab stop, respectively. You can also use the "Tab" key and the "Shift + Tab" keyboard shortcut to Indent and Outdent, respectively.
List Properties/MethodsShows the Tooltip IntelliSense listing the methods and properties of the object that has the cursor. You can also use either "Ctrl + J" or "Ctrl +Space" keyboard shortcuts to do this.
List ConstantsShows the Tooltip Intellisense listing the built-in enumeration constants of the property or argument that has the cursor. You can also use the "Ctrl + Shift + J" keyboard shortcut to do this.
Quick InfoShows the Tooltip Intellisense displaying the format or template of the method/property that has the cursor. You can also use the "Ctrl + I" keyboard shortcut to do this.
Parameter InfoShows the Tooltip Intellisense which lists the arguments for the method having the cursor after the method's open bracket. You can also use the "Ctrl + Shift + I" keyboard shortcut to do this.
Complete WordAuto-completes words while you type, provided you have typed a sufficient number of words to allow the editor to predict the word you are typing correctly. You can also use the "Ctrl + Space" keyboard shortcut to do this.
BookmarksHolds the commands for navigating and clearing bookmarks - i.e., Toggle Bookmark, Next Bookmark, Previous Bookmark, and Clear All Bookmarks.

Excel VBA Editor’s View menu

As you would expect, this VBA editor menu grants you quick access to options for displaying several VBA editor windows.

The Excel VBA Editor's View Menu
The Excel VBA Editor’s View Menu
CommandDescription
CodeOpens the Code Window. You can also use either the "F7" key or the "Alt + V + C" keyboard shortcut to do this.
ObjectShows the active item. You can also use either the "Shift + F7" or "Alt + V + B" keyboard shortcuts to do this.
DefinitionReveals the position in the code where you have defined a variable, subroutine, or function. It would display the Object Browser if the variable, subroutine, or function were defined in a referenced library. You can also use either the "Shift + F2" or "Alt + V + D" keyboard shortcuts to do this.
Last PositionLets you swiftly navigate to any of the previous eight (8) cursor locations that you were at in your code. You can also use either the "Ctrl + Shift + F2" or "Alt + V + N" keyboard shortcuts to do this.
Object BrowserOpens the Object Browser window if it is currently not visible. You can also use either the "F2" or "Alt + V + O" keyboard shortcuts to do this.
Immediate WindowDisplays the Immediate window if it is currently not visible. You can also use either the "Ctrl + G" or "Alt + V + I" keyboard shortcuts to do this.
Locals WindowShows the Locals window if it is currently not visible. You can also use the "Alt + V + S" keyboard shortcut to do this.
Watch WindowOpens the Watches window if it is currently not visible. You can also use the "Alt + V + H" keyboard shortcut to do this.
Call StackDisplays the Call Stack dialog box when you are stepping through your code. So, it is only available when you are debugging your code. You can also use either the "Ctrl + L" or "Alt + V + K" keyboard shortcuts to do this.
Project ExplorerOpens the Project Explorer window if it is currently not visible. You can also use either the "Ctrl + R" or "Alt + V + P" keyboard shortcuts to do this.
Properties WindowShows the Properties window if it is currently not visible. You can also use either the "F4" key or the "Alt + V + W" keyboard shortcut to do this.
ToolboxOpens the Toolbox floating window for the UserForm that you have selected prior. You can also use the "Alt + V + X" keyboard shortcut to do this.
Tab OrderShows the Tab Order dialog box for the UserForm that you have selected prior. The dialog box allows you to alter the order of activation of the UserForm's controls. You can also use the "Alt + V + A" keyboard shortcut to access this dialog box.
ToolbarsDisplays a sub-menu containing the checkboxes that toggle the display of the different VBA editor toolbars. You can also use the "Alt + V + T" keyboard shortcut to access this sub-menu.
Microsoft ExcelToggles the view between the Microsoft Excel application window and the VBA editor. You can also use the "Alt + F11" keyboard shortcut to do this.

Excel VBA Editor’s Insert menu

This aptly named VBA editor menu grants you quick access to commands that let you add new items to your VBA project.

The Excel VBA Editor's Insert Menu
The Excel VBA Editor’s Insert Menu
CommandDescription
ProcedureDisplays the Add Procedure dialog box, allowing you to add new subroutines, functions, or object properties to your VBA project's active module. You can also use the "Alt + I + P" keyboard shortcut to access this dialog box.
UserFormAdds a new UserForm to your VBA project. You can also use the "Alt + I + U" keyboard shortcut to do this.
ModuleAdds a new Standard module to your VBA project. You can also use the "Alt + I + M" keyboard shortcut to do this.
Class ModuleAdds a new Class module to your VBA project. You can also use the "Alt + I + C" keyboard shortcut to do this.
FileDisplays the Insert File dialog box, allowing you to add a text file's code/script to the VBA editor's Code window. You can also use the "Alt + I + L" keyboard shortcut to access this dialog box.

Excel VBA Editor’s Format menu

This VBA editor menu contains commands related to UserForm visual design. It avails you several options for aligning, sizing, spacing, grouping, and ordering UserForm controls.

The Excel VBA Editor's Format Menu
The Excel VBA Editor’s Format Menu
CommandDescription
AlignDisplays a submenu of commands for aligning multiple UserForm controls at once. The available options are Lefts, Centers, Rights, Tops, Middles, Bottoms, and To Grid. The format/alignment of the control you selected first is applied to all other controls in the selection. You can also access this submenu using the "Alt + O + A" keyboard shortcut.
Make Same SizeDisplays a submenu of commands for sizing multiple UserForm controls at once. The available options are Width, Height, and Both. The format/size of the control you selected first is applied to all other controls in the selection. You can also do this with the "Alt + O + M" keyboard shortcut.
Size to FitAlters a selected UserForm control's height and width to fit its contents. You can also do this with the "Alt + O + T" keyboard shortcut.
Size to GridAlters a selected UserForm control's height and width to fit the UserForm gridlines closest to it. You can also do this with the "Alt + O + D" keyboard shortcut.
Horizontal SpacingDisplays a submenu of commands for adjusting the horizontal spacing between multiple UserForm controls at once. The available options are Make Equal, Increase, Decrease, and Remove. You can also do this with the "Alt + O + H" keyboard shortcut.
Vertical SpacingDisplays a submenu of commands for adjusting the vertical spacing between multiple UserForm controls at once. The available options are Make Equal, Increase, Decrease, and Remove. You can also do this with the "Alt + O + V" keyboard shortcut.
Center in FormDisplays a submenu of commands for centring one or more selected UserForm controls on a UserForm's central axes. The available options are Horizontally and Vertically. You can also do this with the "Alt + O + C" keyboard shortcut.
Arrange ButtonsDisplays a submenu for arranging one or more selected buttons (a type of UserForm control) along the bottom or edge of a UserForm. The available options are Bottom and Right. You can also do this with the "Alt + O + R" keyboard shortcut.
GroupOrganizes a selection of UserForm controls into a group that can then be formatted as a unit. You can also do this with the "Alt + O + G" keyboard shortcut.
UngroupDissolves a previously formed group of UserForm controls. You can also do this with the "Alt + O + U" keyboard shortcut.
OrderDisplays a submenu for altering the order of a selected UserForm control. The available options are Bring To Front, Send To Back, Bring Forward, and Send Backward. You can also do this with the "Alt + O + O" keyboard shortcut.

Excel VBA Editor’s Run menu

This VBA editor menu avails you commands that relate to entering or leaving runtime, break mode, and design mode. It also lets you completely reset a VBA project.

Runtime is the period during which the compiler is running your VBA code.

Break Mode is a period when runtime is paused, and you are stepping through your code. You enter it when the compiler encounters an error in your code or you intentional “break” from runtime. You debug your code in break mode, and you can either return to runtime (using the Continue command) or exit to design mode (using the Design Mode command).

Design Mode is the period when the compiler isn’t running your code, and events from the Microsoft Excel or your VBA project will not execute. This period is either before you enter (using the Run command) or after you exit (using the Reset or Design Mode command) runtime. You write your code or design your userforms in design mode.

The Excel VBA Editor's Run Menu
The Excel VBA Editor’s Run Menu
CommandDescription
Run Sub/UserFormRuns the active (i.e., having the cursor) procedure or userform. In break mode, this command becomes the Continue command. Moreover, this command becomes the Run Macro command if neither a procedure nor a userform is active. You can also use the "F5" key to invoke this command.
BreakPauses program execution, while exiting runtime and entering break mode. It allows you to step through your code, line by line, and make certain kinds of changes. You can also use either the "Ctrl + Break" or "Alt + R + K" keyboard shortcuts to invoke this command.
ResetClears the Call stack and module-level variables. You can also use the "Alt + R + R" keyboard shortcut to invoke this command.
Design ModeSwitches on design mode and becomes the Exit Design Mode command.

Excel VBA Editor’s Debug menu

This VBA editor menu contains commands related to reviewing code execution and identifying errors – i.e., debugging.

The Excel VBA Editor's Debug Menu
The Excel VBA Editor’s Debug Menu
CommandDescription
Compile VBAProjectCompiles your project while identifying any syntax errors. You can also use the "Alt + D + L" keyboard shortcut to do this.
Step IntoRuns your code one line or statement at a time. In design mode, it starts code execution and immediately switches to break mode before the first statement runs. Outside design mode, this command switches to break mode (if it wasn't already there) and runs only the current code line. You can also invoke this command using either the "F8" key or the "Alt + D + I" keyboard shortcut.
Step OverExecutes the next code line in the current procedure, while in break mode, regardless of whether the current code line contains a Call statement to another procedure. If a Call statement exists in the current code line, invoking Step Into instead of Step Over executes the first statement in the called procedure. Using Step Over in this scenario runs the called procedure as a unit and shifts execution to the next code line in the current procedure. You can also invoke this command using either the "Shift + F8" or "Alt + D + O" keyboard shortcuts.
Step OutExecutes all the code lines of a called procedure while in break mode, from the current to the last execution point in the called procedure. It displays the statement following the procedure call, once all remaining code lines in the called procedure have run. You can also invoke this command using either the "Ctrl + Shift + F8" or "Alt + D + U" keyboard shortcuts.
Run to CursorWhich is only available in design mode, executes all the code lines from the current statement to a statement of choice situated further down your code. The Margin Indicator icon, which appears in the Margin Indicator bar, identifies the current execution line. You can also invoke this command using either the "Ctrl + F8" or "Alt + D + R" keyboard shortcuts.
Add WatchShows the Add Watch dialog box where you can add watch expressions to the Watches window. You can also invoke this command using the "Alt + D + A" keyboard shortcut.
Edit WatchShows the Add Watch dialog box where you can alter or delete previously added watch expressions. You can also invoke this command using either the "Ctrl + W" or "Alt + D + E" keyboard shortcuts.
Quick WatchShows the Quick Watch dialog box where you can view the current value of watch expressions of your choice. You can also invoke this command using either the "Shift + F9" or "Alt + D + Q" keyboard shortcuts.
Toggle BreakpointInserts or deletes a breakpoint at the current executable statement. You can also invoke this command using either the "F9" key or the "Alt + D + T" keyboard shortcut.
Clear All BreakpointsDeletes all the breakpoints in the active project. This command does nothing to breakpoints due to watch expressions or program errors found at runtime (e.g., when you have the Break on All Errors option selected). You can also invoke this command using either the "Ctrl + Shift + F9" or "Alt + D + C" keyboard shortcuts.
Set Next StatementMoves the execution point to a different statement within the same procedure. This code line can be above or below the currently selected statement in the procedure. Another way to do this is by dragging the Margin Indicator from the currently selected statement to the code line you would like to run next. You can also invoke this command using either the "Ctrl + F9" or "Alt + D + N" keyboard shortcuts.
Show Next StatementHighlights the code line queued to run next. You can also invoke this command using the "Alt + D + X" keyboard shortcut.

Excel VBA Editor’s Tools menu

This VBA editor menu gives you access to several dialog boxes from which you can accomplish a host of specific tasks, from setting object references to adding digital signatures.

The Excel VBA Editor's Tools Menu
The Excel VBA Editor’s Tools Menu
CommandDescription
ReferencesOpens the References dialog box from which you can set a reference to another application's object or type library. Doing so makes that other application's objects available to your code. You can also access this dialog box with the "Alt + T + R" keyboard shortcut.
Additional ControlsOpens the Additional Controls dialog box from which you can add more controls or insertable objects to the Toolbox. You can also access this dialog box with the "Alt + T + A" keyboard shortcut.
MacrosOpens the Macros dialog box from which you can run, edit, or delete a selected macro. You can also access this dialog box with the "Alt + T + M" keyboard shortcut.
OptionsOpens the Options dialog box from which you can access different tabs listing the VBA editor's attributes and customize them as desired. You can also access this dialog box with the "Alt + T + O" keyboard shortcut.
VBAProject PropertiesOpens the Project Properties dialog box from which you can set general and protection-related properties of your project. You can also access this dialog box with the "Alt + T + E" keyboard shortcut.
Digital SignatureOpens the Digital Signature dialog box from which you can set the digital signature certificate for your project. You can also access this dialog box with the "Alt + T + D" keyboard shortcut.

Excel VBA Editor’s Add-Ins menu

This VBA editor menu contains a single item, the Add-In Manager command. This command allows you to open or show the Add-In Manager dialog box, with which you can load and unload add-ins.

Add-Ins are programs you insert into Microsoft Excel to enhance its VBA editor capabilities. Note that you can also access the Add-In Manager dialog box with the “Alt + A + A” keyboard shortcut.

The Excel VBA Editor's Add-Ins Menu
The Excel VBA Editor’s Add-Ins Menu

Excel VBA Editor’s Window menu

This VBA editor menu contains commands that deal with how you want to view the windows that you have opened.

The Excel VBA Editor's Window Menu
The Excel VBA Editor’s Window Menu
CommandDescription
SplitHorizontally divides the Code window (which must be the active window for this to work) into two halves, or recombines already split halves. You can also use the "Alt + W + P" keyboard shortcut to do this.
Tile HorizontallyArranges all your project's open document windows horizontally and without overlaps. You can also use the "Alt + W + H" keyboard shortcut to do this.
Tile VerticallyArranges all your project's open document windows vertically and without overlaps. You can also use the "Alt + W + V" keyboard shortcut to do this.
CascadePiles all your project's open document windows in an overlapping and cascading manner. You can also use the "Alt + W + C" keyboard shortcut to do this.
Arrange IconsPositions the icons of any document windows that you have minimized, neatly at the bottom left of the window. You can also use the "Alt + W + A" keyboard shortcut to do this.
Window ListDisplays all your project's open document windows.

Excel VBA Editor’s Help menu

This menu gives you access to resources that provide assistance with all aspects of Microsoft Excel and VBA.

The Excel VBA Editor's Help Menu
The Excel VBA Editor’s Help Menu
CommandDescription
Microsoft Visual Basic HelpTakes you to Microsoft Office Dev Center's Develop Solutions and Customize Excel page on your browser. There, you'll find helpful information on Excel application and Excel VBA programming.
MSDN on the WebTakes you to the Microsoft Developer Network (MSDN) home page. The MSDN homepage is "the home for Microsoft documentation for end-users, developers and IT professionals."
About Microsoft Visual BasicOpens the About Microsoft Visual Basic dialog box. This dialog box displays your Excel application's version number, copyright notice, and system information.

The Long and Short of It

So, there you have it! The eleven built-in menus on Excel’s VBA editor menu bar – File, Edit, View, Insert, Format, Debug, Run, Tools, Add-Ins, Window, and Help. Each being a collection of commands to perform actions relating to their name.

Notably, you can use the View menu‘s Customize command to alter the make-up of these built-in menus. The Customize command, which you can find in the Toolbars submenu of the View menu, also lets you add commands to the VBA editor menu bar.

You can also check out the Office Dev Center page for more info on the VBA editor’s menus and commands.

As I mentioned earlier, this article is part of the Visual Tour of Excel’s Coding Dojo series exploring each of the Excel VBA Editor’s menus, toolbars, and windows. To check out any of the other posts in the series, click on topic links below:

5 2 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
Keep Learning

Related Articles

Keep Learning

Related Articles