Hyperlink cell placement

  • Thread starter Thread starter Nick P
  • Start date Start date
N

Nick P

This should be easy but I'm having a hard time with it.

I have a large wooksheet and would like to be able to add Hyperlinks to it
so that whenever I hit a hyperlink, the cell chosen is in the upper-left
corner of my screen every time. What happens is the cell I enter for the
Hyperlink goes to the nearest point on the screen and in not revealing the
part of the page I want to view. This must be simple but I'm struggling
with it.
 
Hi Nick,

Add this little bit of code to the sheet containing the hypelinks.
i.e. open the VBE by pressing {Alt}{F11}, double-click the sheet,
and paste the code.

Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
' sets followed hyperlink range to top left cell of screen
ActiveWindow.ScrollRow = Selection.Row
ActiveWindow.ScrollColumn = Selection.Column
End Sub
 
Back
Top