Hello,
I have run into the problem of not being able to programmatically do the following: a) disconnect pivot table slicers; b) change pivot table source (different workbooks); c) reconnect slicers.
I need this because depending on what users want to see, different pivot table data needs to be loaded but I can't change the pivot table source without disconnecting the slicers first.
All pivot tables in this workbook have the same pivot cache.
There are 4 slicers ("Slicer_Office", "Slicer_Week", "Slicer_Name", "Slicer_Name1"), 2 of which connect to tall pivot tables in the wb, and 2 of which connect to different tables.
I've looked elsewhere in the forum and have found something that looks like it should work but I only get errors when I try to run it.
Here is the most promising code I have found so far: Excel forum thread
Here is how Izandol's code looks when I try to adapt it for my use (but I get an error):
So far I get an "Run-time error '5': Invalid procedure call or argument" error at line:![]()
Please Login or Register to view this content.
Please help me,![]()
Please Login or Register to view this content.
Geoff.
Bookmarks