I have this VBA code to add/remove the autofilters, but it toggles back and forth, meaning that when I run it the first time, it adds autofilters, when I run the code again, it removes it, run it again, it adds it again, and so on. I want this code to only remove the autofilter from the spreadsheet if they are on. If they are off, I want them to stay off. How do I break this toggling affect? What's the code?
Greg
========================
Sub RemoveFilters()
Sheets("Spreadsheet").Select
Rows("1:1").Select
Application.CutCopyMode = False
Selection.AutoFilter
End Sub
Greg
========================
Sub RemoveFilters()
Sheets("Spreadsheet").Select
Rows("1:1").Select
Application.CutCopyMode = False
Selection.AutoFilter
End Sub