Microsoft Office Tutorials and References
In Depth Information
With the Name property item selected, either double-click it or press the Alt key to accept
and enter the Name property for the Application object, and then press the Enter key.
The Immediate window will return the result “Microsoft Excel” as shown in Figure 7-5.
Continue to explore on your own. Press the Enter key in the Immediate window to start a
new line, enter the question mark character and press the spacebar, and scroll through the
member list of other objects such as ActiveWorkbook or Range . Keep in mind that many
objects are parents of other objects, so you can go two or more members deep to gather
some information. For example, the ActiveWorkbook object has a Worksheets
collection, and the Worksheets collection has a Count property. Therefore, if you type the line
? activeworkbook.Worksheets.Count into the Immediate window, VBA will return the
number of worksheets the active workbook contains.