共用方式為


Worksheet.AutoFilterMode Property

Definition

Gets or sets a value that indicates whether filtering is currently enabled on the worksheet (that is, whether the filter drop-down arrows are currently displayed).

public:
 property bool AutoFilterMode { bool get(); void set(bool value); };
public bool AutoFilterMode { get; set; }
member this.AutoFilterMode : bool with get, set
Public Property AutoFilterMode As Boolean

Property Value

true if filtering is currently enabled on the worksheet; otherwise, false.

Exceptions

This property is set to true.

Remarks

You can set this property to false to disable filtering (that is, to remove the filter drop-down arrows), but you cannot set it to true. To enable filtering and create a filtered list, use the AutoFilter method of a Range object, or use the AutoFilter method of a NamedRange object.

This property indicates only whether filtering is enabled; it does not indicate whether any data is being filtered. To determine whether the worksheet is actively filtering data, use the FilterMode property.

Applies to