paddysheeran
10-23-2013, 12:16 PM
Hi All,
I need help with an Autofilter issue I cannot tie down. I want to check the state of the autofilter to see whether it is on or not and applied. If it applied do nothing. If it isn't apply it:
If Worksheets("Sheet1").FilterMode = True Then
Else
Selection.Autofilter
End If
Whenever I check the state of Worksheets("Sheet1").FilterMode in the Immediate window it is always false regardless of whether the autofilter is applied or not
The first time through the code if the autofilter is already applied it will be removed. The second time through the code if the autofilter is not applied it is added!!
I cant understand what the problem is??
any help greatly appreciated
thanks,
Paddy
I need help with an Autofilter issue I cannot tie down. I want to check the state of the autofilter to see whether it is on or not and applied. If it applied do nothing. If it isn't apply it:
If Worksheets("Sheet1").FilterMode = True Then
Else
Selection.Autofilter
End If
Whenever I check the state of Worksheets("Sheet1").FilterMode in the Immediate window it is always false regardless of whether the autofilter is applied or not
The first time through the code if the autofilter is already applied it will be removed. The second time through the code if the autofilter is not applied it is added!!
I cant understand what the problem is??
any help greatly appreciated
thanks,
Paddy