The object hierarchy

The Application object (that is, Excel) contains other objects. Here are a few examples of objects contained in the Application object:

♦ Workbooks (a collection of all Workbook objects)

♦ Windows (a collection of all Window objects)

♦ AddIns (a collection of all AddIn objects)

Some objects can contain other objects. For example, the Workbooks collection consists of all open Workbook objects, and a Workbook object contains other objects, a few of which are as follows:

♦ Worksheets (a collection of Worksheet objects)

♦ Charts (a collection of Chart objects)

♦ Names (a collection of Name objects)

Each of these objects, in turn, can contain other objects. The Worksheets collection consists of all Worksheet objects in a Workbook. A Worksheet object contains many other objects, which include the following:

♦ ChartObjects (a collection of ChartObject objects)

♦ PivotTables (a collection of PivotTable objects)

If this seems confusing, trust me, it will make sense, and you'll eventually realize that this whole object hierarchy thing is quite logical and well structured. By the way, the complete Excel object model is diagrammed in the Help system.

Was this article helpful?

0 0

Post a comment