View Single Post
 
Old 05-05-2018, 04:00 AM
LearnerExcel LearnerExcel is offline Windows 7 32bit Office 2013
Advanced Beginner
 
Join Date: Nov 2016
Posts: 82
LearnerExcel will become famous soon enoughLearnerExcel will become famous soon enough
Default How to write if condition for AutoFilter to check ..?

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
Reply With Quote