?
Solved

Scrolling to top of spreadsheet - Excel 2007

Posted on 2011-05-02
4
Medium Priority
?
225 Views
Last Modified: 2012-05-11
I have a spreadsheet with two tabs.  Is there a way to ensure that when I go from one tab to the other I am always at the top of the second spreadsheet even if I have scrolled down on the other spreadsheet.

Example:  I have scrolled down to column K33 on Spreadsheet_A
When I click on spreadsheet_B I would like to be at the top A1
0
Comment
Question by:morinia
  • 2
4 Comments
 
LVL 1

Expert Comment

by:greeboid
ID: 35509604
The last cell chosen on any one sheet is the same, irrespective of where the selected cell is located on a different sheet.
You could write some code, but the easiest way is simply to press CTRL+Home before clicking on the next sheet. This will always return the selected cell to A1. The next time you click on that sheet the cell will be at the same position you left it in... that is: A1.
0
 
LVL 50
ID: 35509712
Hello,

the previous comment could be formulated a bit more concise:

When a sheet is opened, the active cell will be the same cell that had the focus when the sheet was last active. If you scroll in sheet A and then open Sheet B, the scrolling in Sheet A will not make a difference to what cell is in focus on Sheet B.

Pressing Ctl-Home before clicking on a new sheet will not have an effect on the active cell on the new sheet, just on the active cell of the sheet you are about to leave.
0
 

Author Comment

by:morinia
ID: 35509742
teylyn,

I found that out when I tried it. Do you know the code to cause the sheet to position to A1 whenever a sheet is selected?
0
 
LVL 50

Accepted Solution

by:
Ingeborg Hawighorst (Microsoft MVP / EE MVE) earned 2000 total points
ID: 35509771
Yes. Put this into the Sheet Module for each worksheet that you want to select A1 when activated

Private Sub Worksheet_Activate()
    Range("A1").Select
End Sub

Or, if you want to apply this to the whole workbook, put this in the ThisWorkbook module

Private Sub Workbook_SheetActivate(ByVal Sh As Object)
    Range("A1").Select
End Sub


cheers, teylyn
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
Windows Explorer lets you open cabinet (cab) files like any other folder. In VBA you can easily handle normal files and folders, but opening and indeed creating cabinet files takes a lot more - and that's you'll find here.
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question