I am getting the following error while executing a Macro when the filter is not applied. But working quite nice when the filter is already applied. How can I write an if condition to check first whether the filter is applied or not, if applied then need to execute this macro else quit.
Error:
Run-time error '1004':
ShowAllData method of Worksheet class failed
Code:
Code:
Sub RemoveFilter()
ActiveSheet.ShowAllData
End Sub