Skip to main content

PivotTable.CacheIndex property

Table of contents
  1. Syntax
  2. Remarks
  3. Example

Returns or sets the index number of the PivotTable cache. Read/write Long.



expression A variable that represents a PivotTable object.


If you set the CacheIndex property so that one PivotTable report uses the cache for a second PivotTable report, the first report's fields must be a valid subset of the fields in the second report.


This example sets the cache for the PivotTable report named Pivot1 to the cache of the PivotTable report named Pivot2.

Worksheets(1).PivotTables("Pivot1").CacheIndex = _

Leave a comment

Your email address will not be published. Required fields are marked *

Format your code: <pre><code class="language-vba">place your code here</code></pre>