TJDetweiler
New member
- Joined
- Feb 21, 2019
- Messages
- 2
- Reaction score
- 0
- Points
- 0
- Excel Version(s)
- 2010, 2013, 2016, 365
I have inherited a 2010 workbook that I have been told needs to stay in this version, as well as add a 5[SUP]th[/SUP] slicer ( YAY! ). What I initially looked for was to exclude it from being reset when the user selects the clear filters button. The code currently being used, which I have seen on other posts is a general all clear,
Sub ClearMySlicers()
Dim Slcr As SlicerCache
For Each Slcr In ActiveWorkbook.SlicerCaches
Slcr.ClearManualFilter
Next
End Sub
I have also seen where the specific slicers are being called out in the code and put something like this together,
Sub ClearMySlicers()
ActiveWorkbook.SlicerCaches("Slicer_SlicerName01").ClearManualFilter
ActiveWorkbook.SlicerCaches("Slicer_SlicerName03").ClearManualFilter
ActiveWorkbook.SlicerCaches("Slicer_SlicerName04").ClearManualFilter
End Sub
to test the functionality, but the debugger would always stop at the first ActiveWorkbook line and couldn't get it to work.
If someone could let me know how gar off I am with this line of thought would be appreciated.
Thanks in advance for the help.
Sub ClearMySlicers()
Dim Slcr As SlicerCache
For Each Slcr In ActiveWorkbook.SlicerCaches
Slcr.ClearManualFilter
Next
End Sub
I have also seen where the specific slicers are being called out in the code and put something like this together,
Sub ClearMySlicers()
ActiveWorkbook.SlicerCaches("Slicer_SlicerName01").ClearManualFilter
ActiveWorkbook.SlicerCaches("Slicer_SlicerName03").ClearManualFilter
ActiveWorkbook.SlicerCaches("Slicer_SlicerName04").ClearManualFilter
End Sub
to test the functionality, but the debugger would always stop at the first ActiveWorkbook line and couldn't get it to work.
If someone could let me know how gar off I am with this line of thought would be appreciated.
Thanks in advance for the help.