ShowAllData

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
 
D

Dave Peterson

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
 
Top