B
biyi11
Hello,
I am trying to create a macro to run on all worksheets within a tab. S
far it is only running on one worksheet and it does not work on other
Can someone please assist me. Below is the code I used. Thank you
Dim ws As Worksheet
For Each ws In ActiveWorkbook.Worksheets
If ws.Name <> "Sheet1" Or ws.Name <> "Sheet2" Then
Columns("F:H").Select
Range("H1").Activate
Selection.EntireColumn.Hidden = True
End If
Next ws.Activate
End Su
I am trying to create a macro to run on all worksheets within a tab. S
far it is only running on one worksheet and it does not work on other
Can someone please assist me. Below is the code I used. Thank you
Dim ws As Worksheet
For Each ws In ActiveWorkbook.Worksheets
If ws.Name <> "Sheet1" Or ws.Name <> "Sheet2" Then
Columns("F:H").Select
Range("H1").Activate
Selection.EntireColumn.Hidden = True
End If
Next ws.Activate
End Su