Scrolling a split screen with VBA

O

Otto Moehrbach

Excel XP & Win XP
My screen is split with a horizontal split line so that I have an upper and
lower panels or panes.
In manual operation, my mouse scroll wheel scrolls the upper panel only,
regardless of what I do.
Question: How can I scroll (with the mouse scroll wheel only) either panel?

With VBA, how can I address the panel of my choice so that I can scroll that
panel (position a specific cell where I want it)? I know how to position
the cell, but I don't know how to do it in the lower panel. The following
code positions the cell in the upper panel regardless of what pane I put in
the code, 1 or 3:
ActiveWindow.Panes(3).Activate
With ActiveWindow
.ScrollRow = 5
.ScrollColumn = 5
End With
Thanks for your time. Otto
 
T

Tom Ogilvy

I can't say about the mouse wheel, but

Sub ABC()
With ActiveWindow.Panes(1)
.ScrollRow = 10
.ScrollColumn = 5
End With
With ActiveWindow.Panes(2)
.ScrollRow = 5
.ScrollColumn = 5
End With
End Sub

for VBA.

I had one horizontal split line (upper and lower panels), so I didn't have
but two panes.
 
O

Otto Moehrbach

Thanks Tom. Otto
Tom Ogilvy said:
I can't say about the mouse wheel, but

Sub ABC()
With ActiveWindow.Panes(1)
.ScrollRow = 10
.ScrollColumn = 5
End With
With ActiveWindow.Panes(2)
.ScrollRow = 5
.ScrollColumn = 5
End With
End Sub

for VBA.

I had one horizontal split line (upper and lower panels), so I didn't have
but two panes.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top