Change pivot table cache

Copper Contributor

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 are.

 

The purpose is to change the source cache from one pivot table and replace it with the cache from another pivot table in the same excel file.

 

I remember you had to click on one pivot table, then open visual basic with ALT+F11 then CTRL+G and write someting like 

?ActiveWorkbook.XXXXX 

This would return the Cache # (1, 2, 3, 4, whatever) of the pivot table.

 

Next step would be to click on the pivot table I want to chance source and go back to Visual Basic and write the second fuction that I don't recall

 

ActiveWorkbook.XXXXX but at the end yo include the cache # from the previous consult since this would override the cache #

 

I hope this enough information, It's clear that I have very basic VBA knowledge, please help me getting these two pieces I'll make sure I won't loose them again!

0 Replies