Limiting rows & columns

  • Thread starter Thread starter k483
  • Start date Start date
K

k483

I want to keep the far right and far left columns from scrolling off the
page, I want any scrolling to be done within those fixed columns.
 
Far left can be frozen by selecting B1(or B2 if you want top row frozen also)
and Window>Freeze Panes.

Far right cannot be frozen in this manner.

You can set the Scrolling Area through VBA code.

This setting will not remain after closing the file.
Place a code line in the Workbook open event to set it
each time when you open the workbook.

Right-click on the Excel Logo left of your "File" on menu. Select "View Code"
and paste the following in there. Save the workbook and close/re-open to see
the scrollarea fixed to the range A1:H40

Private Sub Workbook_Open()
Sheets("Sheet1").ScrollArea = "A1:H40"
End Sub

Adjust to your sheetname and range.

Gord Dibben Excel MVP
 

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

Back
Top