Excel Object Data Types

Excel VBA has a large number of additional data types that fall under the general category of Object data type. We will see a complete list in the chapter on the Excel object model. To get the feel for the types of objects in the Excel object model, here is a partial list of the more prominent objects:

Chart-related objects:

Axis

ChartTitle

Legend

Series

AxisTitle

DataLabel

LegendEntry

SeriesCollection

Chart

DataTable

LegendKey

TickLabels

ChartArea

Floor

PlotArea

Walls

ChartColorFormat

Gridlines

Point

Pivot table-related objects:

PivotCache

PivotField

PivotFormula

PivotItem

General objects:

Comment

Font

Range

Workbook

FillFormat

Outline

Sheets

Worksheet

Filter

PageSetup

Window

WorksheetFunction

Thus, we can declare variables such as:

Dim wb As Workbook Dim wks As Worksheet Dim chrt As Chart Dim ax As axis Dim pf As PivotField

We will devote much of this book to studying the objects in the Excel object model, for it is through these objects that we can manipulate Excel programmatically.

0 0

Post a comment