Hi,
I want to check if there is an AutoFilter on a worksheet or not with the following code:
Dim ReturnValue As AutoFilter
ReturnValue = ActiveSheet.AutoFilter
If ReturnValue Is Nothing Then MsgBox "There is no Filter"
If ReturnValue = ActiveSheet.AutoFilter then MsgBox "There is a Filter"
This code always returns "There is no Filter" even when there is an AutoFilter.
What is wrong?
Regards
I want to check if there is an AutoFilter on a worksheet or not with the following code:
Dim ReturnValue As AutoFilter
ReturnValue = ActiveSheet.AutoFilter
If ReturnValue Is Nothing Then MsgBox "There is no Filter"
If ReturnValue = ActiveSheet.AutoFilter then MsgBox "There is a Filter"
This code always returns "There is no Filter" even when there is an AutoFilter.
What is wrong?
Regards