PivotCache Method Example

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