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

  • Thread starter Thread starter Dadders
  • Start date Start date
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?
 
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.
 
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!
 
Back
Top