VBE INTRODUCTION IN EXCEL (Visual Basic Editor)

Welcome to Excel Avon

VBE Introduction

The world of VBA begins with the Visual Basic Editor (VBE). It is the platform where you write and manage all the macro code. You can write and save all VBA code in the Visual Basic Editor. Talking about it, it is a code editor for excel in which you can write all the macros and store them. Can only use it with Excel. If you want to use VBE, you can do it just by opening Excel work, we cannot run VBE separately. The Visual Basic Editor is the only way to write VBA code in Excel. In fact, all Microsoft applications that host VBA use the Visual Basic Editor for script writing.

Introduction of VISUAL BASIC EDITOR (VBE) in Excel

To go to the Visual Basic Editor VBE, you need to click in the Developer tab and then click in Visual Basic. You can use the keyboard shortcut keys Alt + F11 to open VISUAL BASIC EDITOR in Windows.

Introduction of VISUAL BASIC EDITOR (VBE) in Excel1

USE OF VISUAL BASIC EDITOR(VBE)

Here you will see several windows, which you can bring to the screen by going to the View tab.

The Project window is where you can see all ongoing projects. Whenever you open a file and then open the Visual Basic Editor, you can see the hierarchy of that file in the Project window.

VBE 1

Each project has a collection of objects,

Worksheets: Each worksheet in the workbook is listed as an object. Workbook: This represents the workbook itself as an object.

VISUAL BASIC EDITOR (VBE) in Excel2

Module: where you write code or record macros store.

VISUAL BASIC EDITOR (VBE) in Excel3

Properties Window

The Properties window gives you access to the properties of the selected object. Each object, for example, a worksheet, has its own properties that you can view and make changes to.

VISUAL BASIC EDITOR (VBE) in Excel6 5

Immediate Window

The Immediate Window is where you can debug your code. You can type a line of code and test how it works. 

VISUAL BASIC EDITOR (VBE) in Excel4

Watch Window

Like the Excel watch window, the Visual Basic editor also has a watch window where you can add expressions to track them.

VISUAL BASIC EDITOR (VBE) in Excel5

Locals Window

You can use the local window in VBE to display all declared variables and their current values in the current process.

VISUAL BASIC EDITOR (VBE) in Excel6

          There are four type tool in toolbar

    1. Debug
    2. Edit 
    3. Standard
    4. UserForm

VISUAL BASIC EDITOR (VBE) 1

You can add or remove checkmarks to display or hide a particular toolbar by clicking on its name. For example, in the screenshot below, the Edit, Standard and UserForm toolbars are being displayed.

VISUAL BASIC EDITOR (VBE) 2

Module

when you insert a new module, VBA create Separate folder for all the modules that you have in the project. You will be writing most of the VBA code in a module. You have to use SUB procedure or FUNCTION procedure to add code to module.

VISUAL BASIC EDITOR (VBE) in Excel6 (2)

So I hope you have understood Introduction of VISUAL BASIC EDITOR (VBE) in Excel and for more information, you can follow us on Twitter, Instagram, LinkedIn, and YouTube as well.

Go to More Topics of Excel VBA

You can also see well-explained video here

Leave a Reply