bring hyperlinked cell to top of page

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

Guest

Is there a way to bring the hyperlinked cell to the top of the page?
Currently, when I select my hyperlinked text, it takes me to the correct
cell, but the cell is always at the bottom of the page. I need it to be at
the top of the page so the user sees it promptly.

Thank you!!
 
You might be able to use the following with the FollowHyperlink event. I'm
fairly new to Excel and visual basic programming, so you might know more
about how to do this than I do.

Sub ActiveTop()

' Move active cell to top of window

' Shortcut key: Ctrl+Shift+A

ActiveWindow.ScrollRow = ActiveCell.Row

End Sub

Good luck,
Patricia Shannon
 
Actually, I'm a newbie to VB too. Where would I find the FollowHyperlink
event and how/where would I enter this code?
 
I need to know how much detail to go into.
Do you know how to create a macro?
Do you know how to use the visual basic editor?
 
I need more detail. Is the hyperlink in an Excel spreadsheet, pointing to a
different Excel spreadsheet, or what?
 
Thanks for your reply but I figured it out. Instead of a hyperlink, I used a
command button with 4 lines of code:

Private Sub CommandButton1_Click()
Range("a50").Select
ActiveWindow.ScrollRow = ActiveCell.Row
End Sub

I hope this can help someone else.
 
I'm glad you figured it out. If I had known the situation, I had already
written a macro that might have helped. In fact I just wrote it within the
last week. It puts the row containing the active cell at the top of the
screen. I have it on a toolbar button and assigned to Ctrl+t.

Sub ActiveTop()

' Move active cell to top of window
' Shortcut key: Ctrl+t

ActiveWindow.ScrollRow = ActiveCell.Row

End Sub
 
p.s., I realize that you have this code as part of your macro, but I thought
it might be of some help to people just beginning to use Excel VBA.
 

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