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 look at how we can open the VBA editor in Excel in several ways.
“If you want a happy ending, learn to open up, because no one can finish a story with a closed book.”
Nishan Panwar
If you wish to skip to any of the other posts in the series, click on any of the topics listed below:
- Exploring each VBA Editor Menu in Excel
- Exploring each VBA Editor Toolbar in Excel
- Getting Started with the Project Explorer
- Getting Started with the Properties Window
- Exploring the VBA Editor’s Code Window
- Exploring the VBA Editor’s Immediate Window
- Getting Started with the Locals Window
- Getting Started with the Watch Window
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.
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.
3-Ways to Open the VBA Editor
Excel’s VBA Editor runs whenever Excel is opened but defaults to a hidden view. So, you don’t need to open the VBA editor; instead, you need to unhide it. Now, you can unhide the VBA Editor in one of three ways – using keyboard shortcuts, the Developer Tab’s Visual Basic button, or the Worksheet Tab.
A keyboard shortcut is a key or series of keys assigned to trigger a specific task in an application. For example, Ctrl + S usually saves the current state of most applications.
Open the VBA Editor with a Keyboard Shortcut
As expected, this method is the quickest and most convenient way to open the VBA editor in Excel. The shortcut, “Alt + F11”, displays the editor and its windows as per the last used editor settings.
In pressing keyboard shortcuts, the plus (+) means you have to hold (i.e., keep pushing) the previous key(s) while pressing the next key.
The shortcut also acts as a toggle between the VBA editor and the Excel workbook views. You can compare it to a website’s front-end, displayed on your browser (e.g., Google Chrome), and its backend design and code, which you can’t see as a user/visitor.
Using the Developer Tab to Open the VBA Editor
Clicking the Visual Basic button on the Developer Tab (located on the Ribbon) will open the VBA editor in Excel.
The Developer Tab may not be available on the Ribbon by default. If so, follow the steps shown in the following images to add it to the Ribbon.
Using the Worksheet Tab to Open the VBA Editor
The image below shows the least popular method to open the VBA editor in Excel. It involves right-clicking on a Worksheet Tab and selecting the View Code command from the popup menu.
Besides displaying the editor, this method also shows the worksheet’s Code window. For now, simply note that the Code window is where you’ll write your code, we’ll get to it later in the Visual Tour of Excel’s Coding Dojo series.
The Long and Short of It
So, there you have it! The three ways you can open the VBA editor in Excel – using keyboard shortcuts, the Developer Tab’s Visual Basic button, or the Worksheet Tab. The fastest and most convenient way is to use the keyboard shortcut, “Alt + F11.”
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:
- Exploring each VBA Editor Menu in Excel
- Exploring each VBA Editor Toolbar in Excel
- Getting Started with the Project Explorer
- Getting Started with the Properties Window
- Exploring the VBA Editor’s Code Window
- Exploring the VBA Editor’s Immediate Window
- Getting Started with the Locals Window
- Getting Started with the Watch Window