Solved

Move to a specific cell and make it the top

Posted on 2014-01-18
5
186 Views
Last Modified: 2014-01-18
Folks,
In my spreadsheet I have command buttons that takes the user to specific cell location. For example, cmdTextFomatting_Click executes Range("A47").Select.  No problem here. However, the user has asked that when they go to a specific cell location that it also makes that cell location the top of the spreadsheet just as if the user scrolled.
Each section also has a command button labeled "Top" and this goes to cell A1 that returns them to the top. This is FYI so you can understand how they would return to the top.
I thought of hiding the columns not needed and unhiding them when they returned to the top, but wanted to know if there was an better way?
0
Comment
Question by:Frank Freese
  • 2
  • 2
5 Comments
 
LVL 40

Assisted Solution

by:als315
als315 earned 250 total points
ID: 39791128
Range("A47").Select
Application.Goto ActiveCell, True
0
 
LVL 43

Accepted Solution

by:
Saqib Husain, Syed earned 250 total points
ID: 39791143
Range("A47").Select
ActiveWindow.ScrollRow =Range("A47").row
0
 

Author Closing Comment

by:Frank Freese
ID: 39791148
thanks...both solutions go me what I was looking for. Can't complain about two for one.
I really appreciate all RR responses - very much
0
 
LVL 43

Expert Comment

by:Saqib Husain, Syed
ID: 39791154
The advantage of scrollrow is that you can also show a number of rows above the selected cell as in

ActiveWindow.ScrollRow =Range("A47").row -2
0
 

Author Comment

by:Frank Freese
ID: 39791622
thanks for the tip and follow-up
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

INDEX and MATCH can be used to great effect to replace HLOOKUP and VLOOKUP as it does not have the limitation of needing the data to be sorted so that the reference value is in the first column or row. It also has the ability to perform a bi-directi…
Approximate matching with VLOOKUP and MATCH seems to me to be a greatly under-used technique, and one which is vital for getting good performance out of large lookups. Until recently I would always have advised using an exact match for simplicity an…
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

828 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