ShowAllData in all workbooks and sheets

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

Guest

Hi

Code required to run ShowAllData on every sheet in every open workbook,
leaving filter buttons/arrows in place.

Something like:

With all Workbooks and all Sheets

If .FilterMode Then
.ShowAllData
End If
End With

TIA

--
Thank you

Regards
Aussie Bob C.
Using Windows XP Home + Office 2003 Pro
 
Sub test()

Dim wb As Workbook
Dim sh As Worksheet

On Error Resume Next

For Each wb In Application.Workbooks
For Each sh In wb.Worksheets
sh.ShowAllData
Next
Next

On Error GoTo 0

End Sub


RBS
 
Thanks RB

very much appreciated

Aussie Bob C.


RB Smissaert said:
Sub test()

Dim wb As Workbook
Dim sh As Worksheet

On Error Resume Next

For Each wb In Application.Workbooks
For Each sh In wb.Worksheets
sh.ShowAllData
Next
Next

On Error GoTo 0

End Sub


RBS
 

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