CacheIndex Property
Applies To
PivotTable object.
Description
Returns or sets the index number of the PivotTable cache. Read/write Long.
Remarks
If you set the CacheIndex property so that one PivotTable uses the cache for a second PivotTable, the first PivotTable's fields must be a valid subset of the fields in the second PivotTable.
Example
This example sets the cache for the PivotTable named "Pivot1" to the cache of the PivotTable named "Pivot2."
Worksheets(1).PivotTables("Pivot1").CacheIndex = _
Worksheets(1).PivotTables("Pivot2").CacheIndex