Solved

Reset Horizontal Scroll bar to the left (Excel 2007)

Posted on 2012-04-06
6
1,454 Views
Last Modified: 2012-04-06
Hello All,
I have a question about a vba code : Scrollbar to the left
Clicking on reset button brings the bottom horizontal scrollbar to the very left. How can a vba code be inserted into that reset button so that it does that every time the button is clicked. The reasoning the number is columns is very big and scrolling from right to left at the end of every line is head ache.
Thank you

R
scrollbar.xlsx
0
Comment
Question by:Rayne
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
6 Comments
 
LVL 47

Accepted Solution

by:
Martin Liss earned 500 total points
ID: 37817742
Put this in a button or macro.

ActiveWindow.ScrollColumn = 1
0
 

Author Comment

by:Rayne
ID: 37817765
thank you MartinLiss
0
 
LVL 47

Expert Comment

by:Martin Liss
ID: 37817767
You're welcome and I'm glad I was able to help.

Marty - MVP 2009 to 2012
0
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!

 
LVL 18

Expert Comment

by:xtermie
ID: 37817792
I haven't worked with it at all, but Stephen Lebans has a solution here that
includes support for horizontal scrollbars:

http://www.lebans.com/setgetsb.htm
SetGetSB.zip is a database containing functions to allow
a user to Set or Get the current position of a ScrollBar Thumb
for a Form.
0
 
LVL 18

Expert Comment

by:xtermie
ID: 37817798
Looking at your example, it could be as simple as this however - add this code on the CommandClick of the button

Worksheets("Sheet1").Activate
ActiveWindow.ScrollColumn = 3 'number of left most column you want to be visible
0
 

Author Comment

by:Rayne
ID: 37817812
Thanks everyone :)
0

Featured Post

Enroll in June's Course of the Month

June’s Course of the Month is now available! Experts Exchange’s Premium Members, Team Accounts, and Qualified Experts have access to a complimentary course each month as part of their membership—an extra way to sharpen your skills and increase training.

Question has a verified solution.

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

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
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…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

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