FilterMode 属性

       

如果指定工作簿处于筛选模式,则该值为 TrueBoolean 类型,只读。

说明

如果指定工作表中包含已筛选序列且该序列中含有隐藏行,则该值为 True

示例

本示例在消息框中显示 Sheet1 的筛选状态。

If Worksheets("Sheet1").FilterMode = True Then
    MsgBox "Filter mode is on"
Else
    MsgBox "Filter mode is off"
End If