Hi All,
Hope you are doing good….
I have small doubt on the Clearing Pivot slicer, I am using VBA code to clear all slicers from Pivot however I don’t know how to apply it on the particular (One) slicer.
Scenario is
I have 5 Slicers on the “Dashboard” Sheet, All my Pivot Tables are available in the “Background” Sheet, now I want to clear only the “Region” Slicer ( No need to change the rest of the slicers), I am unable to figure out this change myself.
Could you please help me with code to clear specific slicer “Region”.
My Current code :-
Sub Clear_Slicers()
Dim oSlicerC As SlicerCache
Application.ScreenUpdating = False
For Each oSlicerC In ActiveWorkbook.SlicerCaches
If oSlicerC.FilterCleared = False Then oSlicerC.ClearManualFilter
Next oSlicerC
Application.ScreenUpdating = True
End Sub
Thanks & Regards,
Sanket
Hope you are doing good….
I have small doubt on the Clearing Pivot slicer, I am using VBA code to clear all slicers from Pivot however I don’t know how to apply it on the particular (One) slicer.
Scenario is
I have 5 Slicers on the “Dashboard” Sheet, All my Pivot Tables are available in the “Background” Sheet, now I want to clear only the “Region” Slicer ( No need to change the rest of the slicers), I am unable to figure out this change myself.
Could you please help me with code to clear specific slicer “Region”.
My Current code :-
Sub Clear_Slicers()
Dim oSlicerC As SlicerCache
Application.ScreenUpdating = False
For Each oSlicerC In ActiveWorkbook.SlicerCaches
If oSlicerC.FilterCleared = False Then oSlicerC.ClearManualFilter
Next oSlicerC
Application.ScreenUpdating = True
End Sub
Thanks & Regards,
Sanket