Excel Auto Filter Function
One way:
Option Explicit
Sub auto_open()
Dim wks As Worksheet
On Error Resume Next
For Each wks In ThisWorkbook.Worksheets
wks.ShowAllData
Next wks
On Error GoTo 0
End Sub
or if you like checking first...
Option Explicit
Sub auto_open()
Dim wks As Worksheet
For Each wks In ThisWorkbook.Worksheets
If wks.AutoFilterMode Then
If wks.FilterMode Then
wks.ShowAllData
End If
End If
Next wks
End Sub
George wrote:
On my spread sheet I am using the Auto Filter and it works ok. My problem is
the spread sheet is shared on a LAN my all the office personnel use it and no
one ever puts all the columns back to the sort "All" default. Is there a way
to make the spread sheet when its closed reset all columns to the "All"
default so the next person doesn't have to make all the corrections to return
the sheet to it's normal view.
Thanks - George
--
Dave Peterson
|