Microsoft Office Tutorials and References
In Depth Information
The VB Editor components
The VB Editor components
The VB Editor consists of a number of components. I briefly describe some of the key
components in the following sections. Refer to Figure 13-1 to get your bearings.
MENU BAR
The VB Editor menu bar works like every other menu bar that you’ve encountered.
It contains commands that you use to work with the various components in the VB
Editor. The VB Editor also features shortcut menus. Right-click virtually anything
in a VB Editor window, and you get a shortcut menu of common commands.
TOOLBARS
The standard toolbar, directly under the menu bar by default, is one of six VB
Editor toolbars that are available. VB Editor toolbars work just like those in Excel:
You can customize toolbars, move them around, display other toolbars, and so
forth.
PROJECT WINDOW
The Project window displays an expandable list that consists of every workbook
that’s currently open in Excel (including add-ins and hidden workbooks). In the VB
Editor, each workbook is known as a project . I discuss the Project window in more
detail in the section “Using the Project Window.” If the Project window is not
visible, press Ctrl+R.
CODE WINDOW
A code window contains VBA code. Every item in a project has an associated code
window. To view a code window for an object, double-click the object in the Project
window. Or, select the item and click the View Code button at the top of the
Explorer window.
For example, to view the code window for the Sheet1 object for a particular
workbook, double-click Sheet1 in the Project window. Unless you’ve added some
VBA code, the code window will be empty. I discuss code windows later in this
chapter (see “Using Code Windows”).
PROPERTIES WINDOW
The Properties window contains a list of all properties for the selected object. Use
this window to examine and change properties. You can use the F4 shortcut key to
display the Properties window. The Properties window is not shown in Figure 13-1.
IMMEDIATE WINDOW
The Immediate window is most useful for executing VBA statements directly,
testing statements, and debugging your code. This window may or may not be visible.
If the Immediate window isn’t visible, press Ctrl+G. To close the Immediate window,
click the Close button on its title bar.
Search JabSto ::




Custom Search