Update - It turned out that the issue that I was facing due to an unrelated cause (basically a line of code that needed to be moved earlier in the function. The same code to update the slicer works perfectly fine now.
Thank you all!
-------------------------------
Hi,
I am trying to use VBA to automatically deselect a specific item - 'blank' on a slicer that points to a normal excel table (not a PivotTable).
Below is the code I am using:
When the code is run, I can see that the slicer item 'blank' is deselected, as I want. However, the associated excel table is not autofiltered, meaning, all the rows associated with the slicer item 'blank' are still visible even though the slicer item is deselected. When I toggle the 'blank' slicer item off and on again manually, the table is filtered as expected.
To my mind, it appears to be some kind of 'refresh issue' - the table/slicer is not automatically refreshed/reapplied after the code is run.
If somebody can help me understand the cause and how to fix it, I will be really grateful!
Bookmarks