I have this tiny issue where i am trying to apply the 2nd part of this code (auto filter & Freeze panes)
to all sheets in the active workbook.
Does anyone know what change is required to achieve that?
to all sheets in the active workbook.
Does anyone know what change is required to achieve that?
VBA Code:
Sub filterfreezeallsheets()
Dim ws As Worksheet
For Each ws In ActiveWorkbook.Worksheets
ws.Activate
Rows("1:1").Select
Selection.AutoFilter
With ActiveWindow
.SplitColumn = 0
.SplitRow = 1
End With
ActiveWindow.FreezePanes = True
End Sub