Worksheet.AutoFilter Property (Excel)

Returns an AutoFilter object if filtering is on. Read-only.

expression .AutoFilter

expression A variable that represents a Worksheet object.

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 using the AutoFilter method of the Range object.

The following example returns autofilter for the current worksheet.

Dim Worksheet1 As Worksheet 
 
Dim returnValue As AutoFilter 
returnValue = Worksheet1.AutoFilter
Show:
© 2015 Microsoft