Hi,
I am trying to modify my code to clear the slicers from the active sheet only. I have two tabs with two different dashboards and just need the macro to clear the slicers depending which sheet I'm on. I tried adding the name of the sheet after ActiveWorkbook but no luck.
any help is appreciated!
I am trying to modify my code to clear the slicers from the active sheet only. I have two tabs with two different dashboards and just need the macro to clear the slicers depending which sheet I'm on. I tried adding the name of the sheet after ActiveWorkbook but no luck.
any help is appreciated!
Code:
Sub clearSlicers1()Application.ScreenUpdating = False
Dim slicers As SlicerCache
For Each slicers In ActiveWorkbook.SlicerCaches
slicers.ClearManualFilter
Next slicers
End Sub