Window Movement

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

If I activate a hyperlink on one sheet to a cell on another sheet, the target
cell is shown in the lower right corner of the window. How can I make the
window display the active cell in the top left of the window?

I had considered using the activate sheet event to control the screen
movement but how do I determien the scroll required?

Thanks
 
Nigel said:
If I activate a hyperlink on one sheet to a cell on another sheet, the target
cell is shown in the lower right corner of the window. How can I make the
window display the active cell in the top left of the window?

I had considered using the activate sheet event to control the screen
movement but how do I determien the scroll required?

Thanks

Hi,

Try this code in the code module of either the sheet with the hyperlink
of the sheet the hyperlink takes the user to..

Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
With ActiveWindow
..ScrollRow = ActiveCell.Row
..ScrollColumn = ActiveCell.Column
End With
End Sub

Ken Johnson
 
Works Great
Thanks

Ken Johnson said:
Hi,

Try this code in the code module of either the sheet with the hyperlink
of the sheet the hyperlink takes the user to..

Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
With ActiveWindow
..ScrollRow = ActiveCell.Row
..ScrollColumn = ActiveCell.Column
End With
End Sub

Ken Johnson
 

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

Back
Top