Microsoft Office Tutorials and References
In Depth Information
Working with the Project Explorer
h Project Explorer window: The Project Explorer window displays a tree diagram that
consists of every workbook that is currently open in Excel (including add-ins and hidden
workbooks). Each workbook is known as a project. I discuss the Project Explorer window
in more detail in the next section (“Working with the Project Explorer”).
If the Project Explorer window isn’t visible, press Ctrl+R. To hide the Project Explorer
window, click the Close button in its title bar or right-click anywhere in the Project Explorer
window and select Hide from the shortcut menu.
h Code window: A Code window (sometimes known as a Module window) contains VBA
code. Every item in a project’s tree has an associated code window. To view a code
window for an object, double-click the object in the Project Explorer window. For example,
to view the code window for the Sheet1 object, double-click Sheet1 in the Project
Explorer window. Unless you’ve added some VBA code, the Code window is empty.
Another way to view the Code window for an object is to select the object in the Project
Explorer window and then click the View Code button in the toolbar at the top of the
Project Explorer window.
I discuss Code windows later in this chapter (see “Working with Code Windows”).
h 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 in its title bar (or right-click anywhere in the Immediate
window and select Hide from the shortcut menu).
Working with the Project Explorer
When you’re working in the VBE, each Excel workbook and add-in that’s currently open is
considered a project. You can think of a project as a collection of objects arranged as an expandable
tree. You can expand a project by clicking the plus sign (+) at the left of the project’s name in the
Project Explorer window. You contract a project by clicking the minus sign (–) to the left of a
project’s name. If you try to expand a project that’s protected with a password, you’re prompted
to enter the password.
The top of the Project Explorer window contains three icons. The third icon, named
Toggle Folder, controls whether the objects in a project are displayed in a hierarchy or
are shown in a single nonhierarchical list.
Figure 7-3 shows a Project Explorer window with four projects listed (two XLAM add-ins and two
workbooks).
 
Search JabSto ::




Custom Search