Newbie looking for assistance with looping thru SOME, but not all, worksheets in a workbook -
My workbook has 6 worksheets and I need to do the following for only 3 of the 6 sheets:
I tried the code below but it only works on the active sheet. How do I get it to loop thru all 3 sheets? Any help is appreciated. Thanks.
My workbook has 6 worksheets and I need to do the following for only 3 of the 6 sheets:
- Turn off Freeze Panes
- Turn off AutoFilterMode
- Delete all content
I tried the code below but it only works on the active sheet. How do I get it to loop thru all 3 sheets? Any help is appreciated. Thanks.
Code:
Dim WS As Worksheet
For Each WS In Sheets(Array("Alpha", "Bravo", "Charlie"))
ActiveWindow.FreezePanes = False
ActiveSheet.AutoFilterMode = Flase
Cells.Delete Shift:=xlUp
Next WS