Hi all,
Really need help since I can't solve it by myself I am not familiar with VBA and most of time I just try and error or search how other people write the code.. but i am stuck here.
I have 4 pivot tables (ABCD) in the same sheet and connect to 2 different data sources.
There are 4 slicers, and 2 slicers connect to 2 pivot tables (ie., A & B), and another 2 slicers connect to pivot tables C & D.
I've completed the code to disconnect slicers and still allow the pivot table to reconnect back in later stage (thanks for previous post back to 2012!). Now I need to change the pivot table source data, refresh, and reconnect to respective slicers, and this is the part I failed.
The code I can write is very stupid >"< and after change data source, it removes one of pivot table from the slicer (each slicer has the same issue) hence even after changing the data source, I can't link them back anymore.
Here is the code I have -
The disconnect from slicer is from another post and it works perfectly
But I don't know how to update different pivot tables in the same sheet with different sources in the same workbook so I just write it individually
And after ran this part, pivot table "OTB1" is gone in slicers
Many thanks for your help!
Really need help since I can't solve it by myself I am not familiar with VBA and most of time I just try and error or search how other people write the code.. but i am stuck here.
I have 4 pivot tables (ABCD) in the same sheet and connect to 2 different data sources.
There are 4 slicers, and 2 slicers connect to 2 pivot tables (ie., A & B), and another 2 slicers connect to pivot tables C & D.
I've completed the code to disconnect slicers and still allow the pivot table to reconnect back in later stage (thanks for previous post back to 2012!). Now I need to change the pivot table source data, refresh, and reconnect to respective slicers, and this is the part I failed.
The code I can write is very stupid >"< and after change data source, it removes one of pivot table from the slicer (each slicer has the same issue) hence even after changing the data source, I can't link them back anymore.
Here is the code I have -
The disconnect from slicer is from another post and it works perfectly
But I don't know how to update different pivot tables in the same sheet with different sources in the same workbook so I just write it individually
And after ran this part, pivot table "OTB1" is gone in slicers
Many thanks for your help!