Hyperlink cell placement

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.
 
E

Ed Ferrero

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
 

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

Top