ShowAllData

  • Thread starter Thread starter shimeel
  • Start date Start date
S

shimeel

Hello ... again

in a macro, i call
ActiveSheet.ShowAllData

but if all data was alrady bring displayed, it gives an error.
how can i make sure that it is only executed when needed ?


Shimee
 
Another way is to check first:

Option Explicit
Sub testme()
Dim wks As Worksheet
Set wks = ActiveSheet
With wks
If .FilterMode Then
.ShowAllData
End If
End With
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

Similar Threads


Back
Top