Applies To
Worksheet Object.
Description
Accessor. Returns an object that represents a single PivotTable (a PivotTable object, Syntax 1) or a collection of all the PivotTables (a PivotTables object, Syntax 2) in a worksheet. Read-only.
Syntax 1
object.PivotTables(index)
Syntax 2
object.PivotTables
object
Required. The Worksheet object.
index
Required for Syntax 1. The name or number of the PivotTable (can be an array to specify more than one).
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