Worksheet.AutoFilter (Excel)

Returns an AutoFilter object if filtering is on.

The property returns Nothing if filtering is off. To create an AutoFilter object for a worksheet, you must turn autofiltering on for a range on the worksheet either manually or by using the AutoFilter method of the Range object.


Dim afrAutoFilter As AutoFilter
Set afrAutoFilter = ActiveSheet.AutoFilter