I'd like to reset all of my filters when I save a workbook. Currently I have:
Sub ResetFilters()
On Error Resume Next
ActiveSheet.ShowAllData
End Sub
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, _
Cancel As Boolean)
Dim ws As Worksheet
For Each ws In ActiveWorkbook.Worksheets
Call ResetFilters
Next
Cancel = False
End Sub
The idea is that when I save, I remove all filters. It isn't working for some reason - does anyone have any idea why?
Edit: more googling found the answer : Excel VBA - Run macro before save
Tl;dr: Always google with the keyword stackoverflow in it - it helps dramatically