Question : How to clear an autofilter in VBA

Hi Experts, this should be an easy question, but I can't seem to find an answer.  I need a line or two of code that will clear all the autofilters in a given worksheet.  I have a sheet for which I refresh data on a regular basis, but if I have any filters set (which I often do) it screws up my refresh.  I can toggle the auto filters off then back on - but this seems kind of kludgy.

-Thanks,

Answer : How to clear an autofilter in VBA

If ActiveSheet.FilterMode Then
    ActiveSheet.ShowAllData
End If
Random Solutions  
 
programming4us programming4us