Solved

Move to a specific cell and make it the top

Posted on 2014-01-18
5
183 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 39

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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Dealing with unintended Excel Active-X resizing quirks (VBA code simulates "self correction") David Miller (dlmille) Intro Not everyone is a fan of Active-X controls in spreadsheets (as opposed to the UserForm approach, the older Form controls …
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
Viewers will learn the basics of slicers and timelines for both PivotTables and standard Excel tables in Excel 2013.
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …

705 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now