Go to section of all worksheets

F

FJDx

I have set the following macro to unhide column Y in all sheets.

Dim sh As Worksheet

For Each sh In Sheets(Array("sheet1", "sheet2", "sheet3"))

sh.Columns("X:Z").EntireColumn.Hidden = False

Range("H7").Select

Next



However, how do I also get it to select sell H7 and also scroll to the
top left of the workbook in all sheets?
 
J

JE McGimpsey

One way:

Dim sh As Worksheet
Application.ScreenUpdating = False
For Each sh In Sheets(Array("sheet1", "sheet2", "sheet3"))
With sh
.Columns("Y").EntireColumn.Hidden = False
Application.Goto .Range("A1"), Scroll:=True
.Range("H7").Select
End With
Next sh
Application.ScreenUpdating = True
 
Top