Seamus2626
asked on
Clear filters from slicers
I have a slicer named Sales Team in my worksheet, can i have a line of code that just clears that slicer?
Thanks
Thanks
The code below should clear a specific slicer. You will need to go into Slicer Settings for your Sales Team slicer to get the name to use in formulas. In the code below and the picture it is "Slicer_Sales_Type41".
Sub Clear_Slicer()
Dim scLong As SlicerCache
Dim wb As Workbook
Set wb = ThisWorkbook
Set scLong = wb.SlicerCaches("Slicer_Sales_Type41")
scLong.ClearManualFilter
End Sub
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
There should be a Filter symbol at the top of the slicer selection list which clears the selection.
Thanks
Rob H