ActiveSheet.ShowAllData

  • Thread starter Thread starter Paul
  • Start date Start date
P

Paul

Hi

Whats the best way to code to ensure that filters aren't
enabled when a macro is running

ActiveSheet.ShowAllData

above works fine if filters are enabled but returns an
error in the code if filters arent enabled

thanks in advance
Paul
 
with activesheet
If .AutoFilterMode Then
If .FilterMode Then
.ShowAllData
End If
end if
end with

another way is to just ignore the error:

on error resume next
activesheet.showalldata
 
Back
Top