VBA: Scroll Vertically and Scroll Horizontally
You may need a workbook to always open to a specific view or location on a sheet, or possibly just change the view from a macro. You can do this by using the ScrollRow and ScrollColumn.
ScrollRow:
Used to programmatically scroll a spreadsheet vertically. This example will scroll a spreadsheet to row 5.
ActiveWindow.ScrollRow = 5
ScrollColumn:
Used to programmatically scroll a spreadsheet horizontally. This example will scroll a spreadsheet to column 5.
ActiveWindow.ScrollColumn = 5
And placing the following code in a module will always scroll a workbook’s Sheet1 to row 5 and column 5 if macros are enabled upon opening:
Sub auto_open()
Sheet1.Activate
ActiveWindow.ScrollColumn = 5
ActiveWindow.ScrollRow = 5
End Sub
Can't get the tutorial to work for you? Need help with your code?
Get answers right away at our AE Excel Support Forums!
Get answers right away at our AE Excel Support Forums!



Thanks for this tip!
Hi, thanks for sharing your tips publically.
I am trying to figure out a way to return to a scroll position AFTER I have run a macro to freeze panes & collapse outline…
Using the .select “function” won’t do because as I scroll down through the list (i.e. without “selecting”/clicking on a cell I’m viewing) & run my macro to freeze window and collapse my column level groupings, at the moment my macro switch the “view” back to my last selected cell.
Because this workbook is shared with other “viewers”, I have hidden its outline & “header”, to deter them from “mucking things up”.
Thanks for reading & thanks in advance for your help.
(excuse me if I’ve described things in the wrong terms, I’m relatively new to VBA)