EDUCBA Logo

EDUCBA

MENUMENU
  • Explore
    • EDUCBA Pro
    • PRO Bundles
    • Featured Skills
    • New & Trending
    • Fresh Entries
    • Finance
    • Data Science
    • Programming and Dev
    • Excel
    • Marketing
    • HR
    • PDP
    • VFX and Design
    • Project Management
    • Exam Prep
    • All Courses
  • Blog
  • Enterprise
  • Free Courses
  • Log in
  • Sign Up
Home VBA VBA Resources VBA Information Functions VBA Editor
 

VBA Editor

Ashwani Jaiswal
Article byAshwani Jaiswal
Madhuri Thakur
Reviewed byMadhuri Thakur

VBA Editor in Excel

Excel VBA Editor

VBA Editor is a place where we write VBA code and create macros. Whatever the code we write will be in the background to the excel file with which it is linked, and once we run the code, every process will happen in the background and what we see is the output in the excel file. We always need to activate VBA Editor when we want to see that. And there are many ways to do it. We will be seeing the process of using VBA Editor for MS Excel only. But for all other Microsoft products has the same ways of using Visual Basic Editor.

 

 

How to Open VBA Editor in Excel VBA?

We will learn different examples of Open Visual Basic Editor in Excel.

Watch our Demo Courses and Videos

Valuation, Hadoop, Excel, Mobile Apps, Web Development & many more.

Example #1

If we have selected the option for Developer ribbon from the File menu option, then we would probably see the Developer menu tab in the Menu bar at the top. To access VBA Editor, go to the Developer tab and select the Visual Basic option under the Code section, as shown below.

VBA Editor Developer Tab

Once we click on the above-highlighted menu, this will take us to Visual Basic Editor Window’s home page.

Example #2

There is always a shortcut key to access a function or command which we do by the simple manual process of clicking. So VBA Editor has also a shortcut key. For accessing VBA Editor, Press Alt + F11 keys together. This simple shortcut is easy to remember and quite frequently used when we regularly work on VBA Coding.

Shortcut key

This shortcut key can be used both ways to get into VBA Editor Window and from the VBA Editor window to Excel.

Example #3

There is another way to access VBA Editor. For also quite a direct method to get into editor mode. For this, click right on the Excel sheet tab and select the View Code option as shown below.

VBA Editor View Code Option

Explanation of VBA Editor

We have seen how VBA Editor can be accessed. Above are the steps and methods of going into VBA Editor. Suppose we are in the VBA Editor Window following any of the methods which are shown and explained above. We will see the home window of the VBA Editor. There are different sections in VBA Editor Window itself.

1. Menu Bar

Like every other Microsoft product, there is a Menu bar in VBA also. The menu in VBA consists of different menu options. Common menu options are File, Edit, View, Insert, Tool and Help. These options are mostly available in many and all the menu bars.

The other options which only be there in VBA are Debug, Run, Add-Ins, and Windows.

VBA Editor Menu Bar

All the menu options in the Menu bar have different sub-options and functions which are used to process the subsequent work.

2. ToolBar

Just below the Menu bar, the Toolbar is available. The Toolbar is that section in VBA, where we can find some shortcut buttons which are there in some of the menu bars. Toolbar commonly has Save, View Excel Sheet, Insert User Form, Cut, Copy, Run, Pause and Stop Code, etc.

VBA Editor Tool Bar

3. VBA Project Window

Project Window is the place in VBA where we can find all the sheets, module and project names. This window is most of the time located on the left side of the VBA window.

VBA Editor Project Window

4. Properties Window

The properties window is mostly located below the Project window. We can move this window as per our needs and requirement. This window shows all the properties of the selected Workbook, Worksheet or Module. As here, we have selected Workbook so that properties of that are getting reflected.

properties window

But sometimes we will not be able to find it. To access, this go to the View menu tab and select Properties Window (Or press F4) as shown below.

VBA Editor properties window 1

5. Module

The module is the place where we mostly write the code. Although we can write the code in Sheet, UserForm as well. The benefit of writing the code in Module is that it is easy to execute, and we can use it anywhere we want to.

A module can be inserted from the Insert menu tab, as shown below.

Insert Module

Once we click on it, we will be able to locate the newly added Module in VBA Project Window with a white blank screen where we can write our code as shown below.

module in VBA project

How to Use Excel VBA Editor?

It is the place in any MS Office tool where all the coding related to any automation is done. We can use it in many ways.

  • We can use it for creating a macro.
  • We can create a macro by writing code in VBA Module or Sheet, or else we can record a macro as well.
  • We can also use the written code to link different multiple files of various extensions.

Pros of Excel VBA Editor

  • Code written can directly be implemented in related and linked applications of Microsoft Office.
  • This is the easiest way to write and apply any code as compared with other languages in Java, PHP, and Python.

Things to Remember

  • It does not allow us to save the code in any format. For this saving or retaining the code in MS Office applications, we need to save that file that has the code in Macro-Enabled files.
  • Play with different options and buttons available in VBA Editor Window to get familiar with their functions and applications.
  • Coding for creating a macro can be done in Module, Sheet and User Form.
  • We can apply the written code in Module or Sheet to any buttons, which can be created by options available in Developer ribbon from Control.

Recommended Articles

This is a guide to VBA Editor. Here we discuss how to open Excel Visual Basic Editor and also how to use Visual Basic Editor, including Menu Bar, Tool Bar, Project window and Properties window with description. You can also go through our other suggested articles –

  1. VBA Collection
  2. VBA IF Statements
  3. VBA While Loop
  4. VBA Environ

Primary Sidebar

Footer

Follow us!
  • EDUCBA FacebookEDUCBA TwitterEDUCBA LinkedINEDUCBA Instagram
  • EDUCBA YoutubeEDUCBA CourseraEDUCBA Udemy
APPS
EDUCBA Android AppEDUCBA iOS App
Blog
  • Blog
  • Free Tutorials
  • About us
  • Contact us
  • Log in
Courses
  • Enterprise Solutions
  • Free Courses
  • Explore Programs
  • All Courses
  • All in One Bundles
  • Sign up
Email
  • [email protected]

ISO 10004:2018 & ISO 9001:2015 Certified

© 2025 - EDUCBA. ALL RIGHTS RESERVED. THE CERTIFICATION NAMES ARE THE TRADEMARKS OF THEIR RESPECTIVE OWNERS.

EDUCBA

*Please provide your correct email id. Login details for this Free course will be emailed to you
Loading . . .
Quiz
Question:

Answer:

Quiz Result
Total QuestionsCorrect AnswersWrong AnswersPercentage

Explore 1000+ varieties of Mock tests View more

EDUCBA

*Please provide your correct email id. Login details for this Free course will be emailed to you
EDUCBA
Watch our Demo Courses and Videos

Valuation, Hadoop, Excel, Web Development & many more.

By continuing above step, you agree to our Terms of Use and Privacy Policy.
*Please provide your correct email id. Login details for this Free course will be emailed to you
EDUCBA

*Please provide your correct email id. Login details for this Free course will be emailed to you

EDUCBA Login

Forgot Password?

🚀 Limited Time Offer! - 🎁 ENROLL NOW