• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

remove slicer filter when opening the workbook automatically

Afarag

Member
Dears,

in my workbook a lot of connected slicer in multiple sheet, to be able previewing the outputs well, have to cache all slicer filter, is there a VBA solution let me remove slicer filter automatically when opening the workbook every time

Gratefully,
 
Try the following in the Workbook Module:

Code:
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Dim cache As SlicerCache
For Each cache In ActiveWorkbook.SlicerCaches
 cache.ClearManualFilter
Next cache
End Sub
 
Back
Top