I have a workbook I can not share due to HIPPA protected information. I'm using Excel 2013. Here is a breakdown:
Summary tab (sheet 1)
contains slicers and a summary table
slicers pull from formatted table on Falls tab (sheet 2)
People can change slicers as they see fit. They may go to the Falls sheet and they may turn on additional filters on that table.
I have a button on the Summary sheet that I want them to be able to reset all the slicers on the Summary sheet and the filters on the Falls sheet. Here is the code.
Sub RefreshFalls()
Sheets("Falls").ShowAllData
ActiveWorkbook.SlicerCaches("Slicer_FallsFY").ClearManualFilter
ActiveWorkbook.SlicerCaches("Slicer_FallsMonth").ClearManualFilter
ActiveWorkbook.SlicerCaches("Slicer_FallsSL").ClearManualFilter
ActiveWorkbook.SlicerCaches("Slicer_FallsUnit").ClearManualFilter
End Sub
I am getting an error if no additional filters were turned on for the FAlls sheet. The error is: "Run-time error '1004': ShowAllData method of Worksheet class failed." How can I avoid this error?
Thanks!
Bookmarks