How do I get a "link-to" cell to appear in upper left (Excel)

D

Dadders

In Excel, I would like to ensure that, if a link points to a cell in the
middile of the target page, then that named cell should appear at the upper
left corner of the resulting view. How do I get there from here?
 
H

Héctor Miguel

hi, !
In Excel, I would like to ensure that, if a link points to a cell in the middile of the target page
then that named cell should appear at the upper left corner of the resulting view.
How do I get there from here?

copy/paste/type/... the following in ThisWorkbook code module...

Dim fromHyperlink As Boolean
Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target As Range)
fromHyperlink = Target.Hyperlinks.Count
If fromHyperlink Then
ActiveWindow.ScrollRow = ActiveCell.Row
ActiveWindow.ScrollColumn = ActiveCell.Column
fromHyperlink = False
End If
End Sub

hth,
hector.
 
D

Dadders

Hi. Hector. Thanks for the module. Looks good but, for some reason, it's
not working. I'll study it out a little more and see what I can come up with.

Note; My test case is a hyperlink which refers to cell A141 on another
spreadsheet in the same work book. When the link is activated, Cell A141
will appear in a variety of locatins, sometimes as the very last row in the
display, sometimes about midway down, but NEVER in the Upper Left corner of
the display.

Thanks again for your help!
 

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