Button to Reapply Filters on Sheet(s)

Button to Reapply Filters on Sheet(s)

I wrote a macro that I attached to a button to reapply the filters on all my sheets and it says it works, but it doesn't actually do anything. What is wrong with it? Is there another way? Or even make it work for one sheet?

Sub UniversalFilterRefresh()
    Dim ws As Worksheet
    Dim count As Integer
    count = 0

    ' 1. Optimization
    Application.ScreenUpdating = False
    On Error Resume Next ' Robust error handling for cloud environments

    ' 2. Loop through every single worksheet in the file
    For Each ws In ThisWorkbook.Worksheets
        
        ' Check if the sheet has an AutoFilter turned on
        If ws.AutoFilterMode Then
            ' Re-apply the filter criteria
            ws.AutoFilter.ApplyFilter
            count = count + 1
        End If
        
    Next ws

    ' 3. Restore settings
    Application.ScreenUpdating = True
    On Error GoTo 0

    ' 4. Final report
    MsgBox "Process complete. Refreshed filters on " & count & " sheets.", vbInformation
End Sub
    • Sticky Posts

    • New Features: Repeat Last Action, Insert Cut/Copied Rows/Columns and Hyperlink

      You might have noticed the constant updates to Zoho Sheet of late. Here are 3 more features that have been added to Zoho Sheet recently: F4 - Repeat Last Action Insert Cut/Copied Rows and Columns Insert Hyperlink Here is a screen cast demonstrating each of these features. Read further below to learn more about these new features. F4 - Repeat Last Action: You can now repeat the last action you made on your spreadsheet by using the keyboard shortcut, F4. It is quite handy and helps you get your work
    • What's new in Zoho Sheet: Simplify data entry and collaboration

      Hello, Zoho Sheet community! Last year, our team was focused on research and development so we could deliver updates that enhance your spreadsheet experience. This year, we’re excited to deliver those enhancements—but we'll be rolling them out incrementally
    • Introducing Forms in Zoho Sheet

      We hereby bring you the power of ​forms in Zoho Sheet. ​Now, build and create your own customized forms using Zoho Sheet. Be it compiling a questionnaire or rolling out a survey, Zoho Sheet can do it all for you. Forms is an excellent feature that helps you collect information in the simplest of ways and having it in Zoho Sheet takes it a notch higher. Build Simple yet Powerful forms Building forms using Zoho Sheet is fairly simple. The exclusive 'Form' tab lets you create one quickly. Whether you
    • Slicers are now available in Zoho Sheet—filter your data interactively

      At Zoho Sheet, we diligently track user requests and feedback. In line with this, based on extensive user requests, we've integrated Slicers to pivot tables and are delighted to announce its release. Slicers are interactive visual filters that have add,
    • Introducing Data Bars: Graphically represent changes in data within the cells

      Conditional formatting has helped millions of spreadsheet users analyze and highlight their data more efficiently. In addition to the classic rules, color scales, and icon sets available in Zoho Sheet, you can now apply Data Bars, a convenient method