Hi,
Is this the right VBA code to clear all slicers, and timelines in a pivot table?
Also asked here VBA code to clear all Slicers and Timeline objects in the current sheet
Is this the right VBA code to clear all slicers, and timelines in a pivot table?
VBA Code:
Sub ClearSlicersTimeline()
Dim slcr As SlicerCache
For Each slcr In ActiveSheet.SlicerCaches
slcr.ClearAllFilters
Next
End Sub
Also asked here VBA code to clear all Slicers and Timeline objects in the current sheet
Last edited by a moderator: