PivotTables Method
Applies To
Worksheet object.
Description
Returns an object that represents either a single PivotTable (a PivotTable object, Syntax 1) or a collection of all the PivotTables (a PivotTables object, Syntax 2) on a worksheet. Read-only.
Syntax 1
expression.PivotTables(Index)
Syntax 2
expression.PivotTables
expression Required. An expression that returns a Worksheet object.
Index Optional Variant. The name or number of the PivotTable (can be an array to specify more than one PivotTable).
See Also
PivotFields method, PivotItems method.
Example
This example sets the Sum of 1994 field in PivotTable1 to use the SUM function.
ActiveSheet.PivotTables("PivotTable1"). _
PivotFields("Sum of 1994").Function = xlSum