Excel 2013 VBA Clear All Filters macro

后端 未结 26 853
花落未央
花落未央 2020-11-27 16:26

It seems older macros are not working. I have proper securtiy set to run VBA macros but when I have tried a few methods for clearing ALL filters on a worksheet, I get a comp

相关标签:
26条回答
  • 2020-11-27 17:18

    I found this answer in a Microsoft webpage

    It uses the AutoFilterMode as a boolean .

       If Worksheets("Sheet1").AutoFilterMode Then Selection.AutoFilter
    
    0 讨论(0)
  • 2020-11-27 17:20

    This works best for me.

    I usually use the following before I save and close the files.

    Sub remove_filters
    
    ActiveSheet.AutofilterMode = False
    
    End Sub
    
    0 讨论(0)
提交回复
热议问题