pps!


I have an excel report on which i have to write the program for making formatting changes in that. But before that i want to check the autofilter (Selection.AutoFilter) status (whether on or off).

I want to check this in the midde of my code..

code
.
.
if autofilter is ON
xyz
if autofilter OFF
Make it on
.
.

How to do this




Re: Checking the status of autofilter

ADG


Hi

Here is some code mostly copied from the help text

Dim rsp
If Worksheets("Sheet1").AutoFilterMode = True Then
rsp = MsgBox("Filter On", vbOKOnly)
Else
Worksheets("Sheet1").Range("A1").AutoFilter _
field:=1, _
Criteria1:="Otis"
End If