scroll to activecell?

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

Guest

Hello.

Someome just called with this question... he has a list of various errors...
and in that grid, he has a column of hyperlinks to a different sheet. On
that sheet, are screen shots of the various errors that are listed in the
table on the first sheet.

that part all works fine, but depending upon where the activecell is in the
hyperlink destination sheet , sometimes the activecell is at the bottom of
the window.

would someone tell me how to get the activewindow to scroll so that the
activecell is in the upper left?

the hyperlink assignment doesn't seem to let you link to vb code, but I was
thinking it would work by doing it on the sheet's activate event code...

thanks.
mark
 
Paste this code into your sheet code window:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
With ActiveWindow
.ScrollRow = ActiveCell.Row
.ScrollColumn = ActiveCell.Column
End With
End Sub
 
thank you very much. I do a lot of coding, but it's usually not stuff where
anyone cares just where the window is at any given time.

thanks!
 
Back
Top