'go to' macros

  • Thread starter Thread starter FJDx
  • Start date Start date
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?
 
Hi FJDx

Try this

Sub Test()
Dim sh As Worksheet
For Each sh In Sheets(Array("sheet1", "sheet2", "sheet3"))
sh.Columns("X:Z").EntireColumn.Hidden = False
Application.GoTo sh.Range("H7"), True
Next
End Sub
 
Ron de Bruin said:
Hi FJDx

Try this

Sub Test()
Dim sh As Worksheet
For Each sh In Sheets(Array("sheet1", "sheet2", "sheet3"))
sh.Columns("X:Z").EntireColumn.Hidden = False
Application.GoTo sh.Range("H7"), True
Next
End Sub

Thank you. Is there an option to scroll to a certain area of each
worksheet selected as well?
 
If I understand you correct

For Each sh In ActiveWindow.SelectedSheets
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top