What is the VBA Editor and a VBA Project?

Since 1998

What is a VBA Module and How is a VBA Module Used?

Excel VBA Tutorial

Presented below is a brief introduction to the VBA Editor and a VBA project.

The VBA Editor is where you type, edit and debug your VBA code. A VBA project organizes your code in a workbook file.

The VBA Editor, VBA project and how they are used.

The VBA Editor is where you view, type, edit, debug and run your VBA code. VBA code is typed in what are called modules. You can also use the Editor to build userforms which are basically floating screens that display ActiveX controls. The VBA Editor has many windows that can be displayed depending on your coding tasks. You activate the VBA Editor in Excel by pressing the Alt+F11 keys on your keyboard.

When observing VBA code in the Editor, you will see the code is organized in what are called projects. A VBA project in Excel is defined as a collection of VBA modules, userforms and various other programming elements, there is only one VBA project per workbook file. VBA projects are automatically created in Excel when a workbook file is created so you do not have to create one. To save a VBA project and its modules, you save the workbook file that contains them.

Projects are viewed in the Project Explorer window in the VBA Editor. The Project Explorer window is presented in the picture below and is labeled Project -VBAProject. It's default position is in the upper left-hand side of the Editor window and looks like a file tree. If you have multiple files open at once, then you will see multiple projects in the Explorer window. To display any project item, just double click on its icon in the Project window. When first starting, it is better to have just one workbook file open so you do not get your projects confused.

Excel VBA Editor
> > > >
In the Excel VBA example above, The VBA Editor has been launched with the Project Explorer window displayed. You can see one project in the window and it belongs to Book1, look in the ()'s next to the VBAProject icon to see the book name. A standard module has been inserted into the project and is seen in the window on the right-hand side of the Editor. That is where you can type VBA code.
03/06
< Back
Next >
Facebook Contact Us Newsletter
Need Help? Please call us at 1.805.498.7162

Excel Software Design/Consulting

- Microsoft Excel Software

- Microsoft Excel Consulting

Microsoft Excel Products

- Excel Self-Study Manuals

Copyright © 2002-2019

EMAGENIT All Rights Reserved