Chapter 16. The Application Object

As we discussed in Chapter 15, the majority of the action in the Excel object model rests in the six objects: Application, Chart, PivotTable, Range, Workbook, and Worksheet. In this book, we will concentrate on the following objects, along with some of their children:

Application
Chart
CommandBars
Dialogs
Global
Names
Range
Sheets
Window/Windows
Workbook/Workbooks
Worksheet
WorkSheetFunctions

This constitutes the vast majority of the Excel object model. With this knowledge, you should be able to program most Excel tasks and be in a position to easily pick up any additional information from the Excel help files that you might need for less common programming tasks.

As you might imagine, several of these objects are complicated enough to deserve a complete chapter, so we will devote this chapter to discussing some of the properties and methods of the Application object itself, along with some of its simpler children.

Figure 16-1 shows the Application object, which sits atop the Excel object model and represents Excel itself, and its children. Each object is preceded by an icon that indicates whether it is a collection object (the little basket) or a noncollection object (the little oval).[1]

The Excel Application object and its children (the tag <vX> means that the object is new in version X of Excel)
Figure 16-1. The Excel Application object and its children (the tag <vX> means that the object is new in version X of Excel)

Figure 16-2 shows all children of the Application ...

Get Writing Excel Macros with VBA, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.