Positioning the cursor programatically

J

Jeff Smith

Hi,
I have a multi-sheet workbook where all "navigation" (from sheet to sheet)
is controlled by macros. The user is allowed (and indeed is encouraged) to
scroll up/down/left/right. However, Excel remembers the last position or
view for a particular spreadsheet. This is not desired and I would like all
entries to a sheet or range within a sheet to have "Cell A1" (or the left
uppermost cell in a range) positioned at the top, left-most cell on the
range viewed on the monitor.

Can someone help here? I'm sure it is simple but I can find no references
in the extensive VBA sites around.

Thanking you in anticipation,

regards

Jeff Smith
 
T

Tom Ogilvy

go to the workbook event module (thisworkbook in the project explorer) and
us an event like this:

Private Sub Workbook_SheetActivate(ByVal Sh As Object)
Application.Goto Sh.Range("A1"), True
End Sub
 

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