Hi Excelperts
I have a little macro to clear the autofilter on my page. But if the filter is ALREADY clear, it gives me an error. I have to get it to just do nothing if its already clear to stop this error from popping up (as its going to be distributed to others)
This is my code:
I have a little macro to clear the autofilter on my page. But if the filter is ALREADY clear, it gives me an error. I have to get it to just do nothing if its already clear to stop this error from popping up (as its going to be distributed to others)
This is my code:
Code:
Sub clearfilter()
Sheets("data connection").Select
Rows("1:1").Select
ActiveSheet.ShowAllData
End Sub