Visual Basic Editor (VBE)

2 minute read

Visual Basic Editor or VBE is a separate application in your CAD application.

In this application you write and edit your Macro code.

This application works without a glitch with most of the CAD programs.

By without a glitch I mean that your CAD program take cares of opening of VBE when you need it.

you can’t run the VBE separately. You CAD program must be running in order to run VBE.

VBE Environment

Below figure shows the VBE program, with some of the key parts given.

Chances are that your VBE program window won’t look exactly like that below figure.

The VBE contains several windows, and it’s highly customizable. You can hide windows, rearrange windows, dock windows, and so on.

Visual-basic-editor

The VBE Menu Bar works just like every menu bar of other applications.

It contains commands that you use to do things with the various components in the VBE.

You also find that many of the menu commands have shortcut keys associated with them.

The VBE also features shortcut menus. You can right-click virtually anything in the VBE and get a shortcut menu of common commands.

Tool Bar

The Standard toolbar, which is directly under the menu bar by default (refer to above figure), is one of four VBE toolbars available. You can customize the toolbars.

If you’re so inclined, use the View Toolbars command to work with VBE toolbars.

Most people just leave them as they are.

Project Window

The Project Window display a tree diagram that shows every file opened.

If the Project Window is not visible, press “Ctrl+R” or use the View -> Project Explorer command.

To hide the Project Window, click the close button in its title bar.

Code Window

Code Window is place where we write our code. Therefore this window contains VBA code.

Every object in a project has association with Code Window. To view the code for any object’s, double click on the object in the Project Window.

Unless you have added some VBA code, the Code window will be empty.

Immediate Window

The Immediate window may or may not visible. If it is not visible, press “Ctrl+G” or use View -> Immediate window command.

To close The Immediate window, click the close button in its title bar.

The Immediate window is most useful for executing VBA statement directly and for debugging your code.

If you are just starting VBA, this window won’t be all that useful, so feel free to hide it and free up some screen space.

Next post will be about VBE Windows.

Updated: