Microsoft Office Tutorials and References
In Depth Information
Try It
figurE 7-4
7.
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.
figurE 7-5
8.
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.
To view the video that accompanies this lesson, please select Lesson 7, available at
the following website: www.wrox.com/go/excelvba .
Search JabSto ::




Custom Search