Remarks

The PivotCache object is a member of the collection.

Example

Use the 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.

Visual Basic for Applications
Worksheets(1).PivotTables(1).PivotCache.RefreshOnFileOpen = True

Use (), where is the PivotTable cache number, to return a single PivotCacheobject from the PivotCachescollection for a workbook. The following example refreshes cache one.

Visual Basic for Applications
ActiveWorkbook.PivotCaches(1).Refresh
Describe PivotCache? Pivot Cache Object PivotCache PivotCache Object

See also:

index index