PivotTable Object [Excel 2003 VBA Language Reference]

Multiple objects
PivotTable
Multiple objects

Represents a PivotTable report on a worksheet. The PivotTable object is a member of the PivotTables collection. The PivotTables collection contains all the PivotTable objects on a single worksheet.

Using the PivotTable Object

Use PivotTables(index), where index is the PivotTable index number or name, to return a single PivotTable object. The following example makes the field named year a row field in the first PivotTable report on Sheet3.

Worksheets("Sheet3").PivotTables(1) _
    .PivotFields("Year").Orientation = xlRowField

Remarks

Because PivotTable report programming can be complex, it's generally easiest to record PivotTable report actions and then revise the recorded code. To record a macro, point to Macro on the Tools menu and then click Record New Macro.

Properties | Application Property | CacheIndex Property | CalculatedMembers Property | ColumnFields Property | ColumnGrand Property | ColumnRange Property | Creator Property | CubeFields Property | DataBodyRange Property | DataFields Property | DataLabelRange Property | DataPivotField Property | DisplayEmptyColumn Property | DisplayEmptyRow Property | DisplayErrorString Property | DisplayImmediateItems Property | DisplayNullString Property | EnableDataValueEditing Property | EnableDrilldown Property | EnableFieldDialog Property | EnableFieldList Property | EnableWizard Property | ErrorString Property | GrandTotalName Property | HasAutoFormat Property | HiddenFields Property | InnerDetail Property | ManualUpdate Property | MDX Property | MergeLabels Property | Name Property | NullString Property | PageFieldOrder Property | PageFields Property | PageFieldStyle Property | PageFieldWrapCount Property | PageRange Property | PageRangeCells Property | Parent Property | PivotFormulas Property | PivotSelection Property | PivotSelectionStandard Property | PreserveFormatting Property | PrintTitles Property | RefreshDate Property | RefreshName Property | RepeatItemsOnEachPrintedPage Property | RowFields Property | RowGrand Property | RowRange Property | SaveData Property | SelectionMode Property | ShowCellBackgroundFromOLAP Property | ShowPageMultipleItemLabel Property | SmallGrid Property | SourceData Property | SubtotalHiddenPageItems Property | TableRange1 Property | TableRange2 Property | TableStyle Property | Tag Property | TotalsAnnotation Property | VacatedStyle Property | Value Property | Version Property | ViewCalculatedMembers Property | VisibleFields Property | VisualTotals Property

Methods | AddDataField Method | AddFields Method | CalculatedFields Method | CreateCubeFile Method | Format Method | GetData Method | GetPivotData Method | ListFormulas Method | PivotCache Method | PivotFields Method | PivotSelect Method | PivotTableWizard Method | RefreshTable Method | ShowPages Method | Update Method

Parent Objects | PivotCell Object | PivotFields Collection | PivotLayout Object | Range Collection

Child Objects | CalculatedMembers Object | CubeFields Object | PivotField Object | PivotFormulas Object | Range Object

See Also | PivotCache Object | PivotCell Object | PivotField Object | PivotFormula Object | PivotItem Object | PivotItemList Collection | PivotLayout Object