Introducing Visual Basic Editor (VBE)

We are going to discuss the main components of VBE as per the figure shown below

1. Menu Bar - This menu bar at the top has all the features that are required in any editor and many commands have shortcut keys associated with them.
2. Toolbar – It lies below menu bar providing buttons for common operations..
3.Project Window – The Project window displays a tree like structure that shows every workbook and its component currently open and we can select to open any object from there.
4. Code Window – In this window we put our VBA code and all the codes associated to any object lying in the project window can be seen here by double clicking on the object name.
5. Immediate Window – We can activate the Immediate window by pressing Ctrl+G if it is not visible in VBE. It is very useful tool to get immediate answers about excel file and quickly execute code If we need to ask any question then the code in immediate window starts with “?” . 

For example

:- If we want to know what value is stored in current active cell of excel sheet then type below code and press enter

? activecell.value


Another example

– If we want to find out number of sheets in workbook then type below code and press enter

? worksheets.count

We will discuss in detail about all these components in coming modules.

© Snagoff. All right reserved.