Forum Discussion
Dustdaniel
Sep 25, 2024Copper Contributor
Change pivot table cache
Hi Everyone, A couple of years ago I found in a different forum, that you can change the cache ID from a pivot table, you just need 2 functions to do so and I need your help to find what these ar...
UriahGrove
Mar 24, 2025Iron Contributor
ActiveSheet.PivotTables(index).PivotCache.Index: This retrieves the cache ID of the specified Pivot Table. ActiveSheet.PivotTables(index).PivotCache = ActiveWorkbook.PivotCaches(cache_id): This sets the Pivot Table's cache to the specified cache – replacing index with the Pivot Table index and cache_id with the desired cache ID.