PivotCache Object
This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.
PivotCache PivotTable |
Represents the memory cache for a PivotTable report. The PivotCache object is a member of the PivotCaches collection.
Using the PivotCache Object
Use the PivotCache method to return a PivotCache object for a PivotTable report (each report has only one cache). The following example causes the first PivotTable report on the first worksheet to refresh itself whenever its file is opened.
Worksheets(1).PivotTables(1).PivotCache.RefreshOnFileOpen = True
Use PivotCaches(index), where index is the PivotTable cache number, to return a single PivotCache object from the PivotCaches collection for a workbook. The following example refreshes cache one.
ActiveWorkbook.PivotCaches(1).Refresh