PivotCache.OptimizeCache property (Excel)

True if the PivotTable cache is optimized when it's constructed. The default value is False. Read/write Boolean.



expression A variable that represents a PivotCache object.


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.


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

Worksheets(1).PivotTables("Pivot1") _ 
 .PivotCache.OptimizeCache = True

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.