Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

hyperlink to cell goes to bottom of screen, not top

Status
Not open for further replies.

AGlazer

Programmer
Sep 15, 2002
38
0
0
US
hi, everyone.

alright, this is a silly question, and I should know how to do this, but it's the holidays and my brain is fried.

when i'm inserting a hyperlink inside an excel sheet pointing to a cell or name (say, cell C41), once you click on the hyperlink, it takes you to cell C41, but cell C41 is on the bottom of the screen - I need it to recenter on the top of the screen.

any ideas?

thanks,

aaron
 
I'm wondering the same thing. Doesn't anyone out there know how to do this? This is over 1 month old!

Thanks,

GG
 
Hi Aaron, [2thumbsup]

It’s not possible to capture the hyperlink on action! (to my knowledge)

I’ve created this workaround:
Put this in to the sheet code the Hyperlink is in:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Worksheets(1).Range("C41").Select Then
ActiveWindow.SmallScroll Down:=16
End If
End Sub

It’s not the most brilliant solution, but it works!

Hope you can utilise this

Enjoy,
Joost Verdaasdonk
 
HI,

Skip my last thread,

This seams to work a whole lot better:

Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
If Worksheets(1).Range("C41").Select Then
ActiveWindow.SmallScroll Down:=30
End If
End Sub

Is this a better option?

Enjoy,
Joost Verdaasdonk
 
Really spooky for a Friday, this is! Just messing around with something completely unrelated and stumbled accross the answer to this problem, and only 3 weeks after the event!!

To make the target of your hyperlink the top left cell of your sheet use this code in the sheet module of the sheet containing the hyperlink.

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

Happy Friday
;-)

If a man says something and there are no women there to hear him, is he still wrong? [ponder]
The faqs ma'am, just the faqs. Get the best from these forums : faq222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top