Hi,
If you try to show all data when either
(1) There isn't an autofilter object or
(2) The autofilter object isn't actively filtering anything
Then you'll get a runtime error. Other things may interfere too - such as worksheet protection.
You are using XL 2003 so I would do it like this:
Sub ShowAll()
Worksheets("Front").Range("Option_att_flag").Value = "Any"
Worksheets("Front").Range("option_gender").Value = "Any"
Worksheets("Front").Range("option_cic").Value = "Any"
Worksheets("Front").Range("option_SenLevel").Value = "Any"
If Worksheets("List").AutoFilterMode Then
If Worksheets("List").FilterMode Then
Worksheets("List").ShowAllData
End If
End If
End Sub
@ mohd9876
Unfortunately, in XL 2003 the Autofilter object does not have a ShowAllData method, so headexperiment won't be able to check your suggestion.
Bookmarks