[toc]


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.

ScrollColumn

Used to programmatically scroll a spreadsheet horizontally. This example will scroll a spreadsheet to column 5.

AutoScroll to Certain Row & Column On Workbook Open

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:

VBA Coding Made Easy

Stop searching for VBA code online. Learn more about Easy VBA. A VBA add-in to quickly insert any of the sample code found on our site directly into the Visual Basic Editor, save your own frequently used code, and more!

alt text

Stop searching for VBA code online. Try the Code VBA Add-in…

Learn More!


<<Return to VBA Examples

Did you find this VBA tutorial useful? Then share it with your friends and colleagues: