Data Filtering 'Show All' macro

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Using Excel 2000, I have created a macro that has the same functionality as
the data toolbar command 'Show All' and assigned it to a command button on
the worksheet. How do I modify the macro so that it recognises that the data
is unfiltered and prevents a run-time error '1004'message appearing?

Regards

Andy
 
Sub AA()
If ActiveSheet.FilterMode Then
ActiveSheet.ShowAllData
End If
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top