Syntax

expression.OptimizeCache

expression A variable that represents a PivotCache object.

Remarks

Cache optimization results in additional queries and degrades initial performance of the PivotTable report.

For OLE DB data sources, this property is read-only and always returns False.

Example

This example causes the PivotTable cache for the first PivotTable report on worksheet one to be optimized when it's constructed.

Visual Basic for Applications
Worksheets(1).PivotTables("Pivot1") _ .PivotCache.OptimizeCache = True
build pivot table cache optimal Optimize optimize cache Optimize Cache Property optimize pivot table cache when constructed OptimizeCache optimizecache property set cache pivot table optimized constructed

See also: