scroll to activecell?

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
 
G

Guest

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
 
G

Guest

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!
 

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