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.
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.
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.
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.
Module: where you write code or record macros store.
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.
Immediate Window
The Immediate Window is where you can debug your code. You can type a line of code and test how it works.
Watch Window
Like the Excel watch window, the Visual Basic editor also has a watch window where you can add expressions to track them.
Locals Window
You can use the local window in VBE to display all declared variables and their current values in the current process.
There are four type tool in toolbar
-
- Debug
- Edit
- Standard
- UserForm
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.
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.
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