I am trying to get a VBA code to undo the last slicer selection made (after certain criteria are met), but I can't seem to get VBA to recognize the slicer by name.
Whenever I try to reference it I get out or range or does not support method errors, and after adding line-by-line error detection it seems the part it consistently gets stuck on is that it can't find the slicer on the sheet, and i've triple-checked the names and all that to verify it wasn't a typo issue.
Does anyone have any experience referencing slicers in VBA that can give me a basic 'how to reference it' format that worked for them? I tried slicercache but... I just don't know what exactly I need to be pointing this at.
Specifically i'm trying to store the 'last selection' made in the slicercache and if that action would cause the pivot table to overrun a certain cell (selecting more than 6 options at the same time) the code will display a message saying not to do that and then un-do the selection they just made without clearing the entire slicer. I think i've got the rest figured out, I just can't figure out how to get the code to find it.
Bookmarks