Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VBA Excel setting scroll bars

Status
Not open for further replies.

dprayner

Programmer
Oct 14, 2002
140
US
Hi people.

I was wondering if anyone knows how to make the scroll bars adjust to the absolute top and left when a spreadsheet is opened.

I know the basic usage of the ActiveWindow.SmallScroll function, but there isn't anyway to know if the last person scrolled down 100, 10, or 1 position.

I was hoping that the settings could be set like an X,Y type coordinate.

Thanks, DAVE
 
range(a1).select ?

[tt]_____
[blue]-John[/blue][/tt]
[tab][red]The plural of anecdote is not data[/red]

Help us help you. Please read FAQ181-2886 before posting.
 
Range("A1").Select put the focus on cell A1 which I am also doing, but the scroll bars don't move from their saved location. DAVE
 
I don't understand how that can not work. If A1 is visible, then the scroll bars must be set to the top left.

But anyway, I just randomly selected two really big numbers to use with LargeScroll. This will work even if the focus is on IV65536:
Code:
Application.ScreenUpdating = False
    ActiveWindow.LargeScroll up:=10000, toleft:=250
Application.ScreenUpdating = True

[tt]_____
[blue]-John[/blue][/tt]
[tab][red]The plural of anecdote is not data[/red]

Help us help you. Please read FAQ181-2886 before posting.
 
Private Sub Workbook_Open()
ActiveWindow.ScrollRow = 1
ActiveWindow.ScrollColumn = 1
End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top