Restricting Scroll Area

S

Steve Jones

Hi

I have used the control box toolbar, properties, scroll area to set a range.
I can see the range I have typed in the the box. I have a couple of
reference books which I use but can see no mention of this.

It works while the worksheet is open, but despite saving changes, everytime
I go back into the file the scroll area is not set.

Where am I going wrong?

Thanks

Steve
 
D

Don Guillett

you need to re-set the scroll area each time by using the workbook_open
event in the ThisWorkbook module.
 
M

Max

It works while the worksheet is open, but despite saving changes, everytime
I go back into the file the scroll area is not set.

Yes, think I read from past posts that it's transient (doesn't get saved) ..

Try the sub* below, which is to be placed in the "ThisWorkbook" module
*adapt to suit

Right-click on the Excel icon just to the left
of "File" on the menu > Choose "View Code"
(This will bring you direct into the "ThisWorkbook" module)

Copy > Paste the sub into the code window on the right
(clear the defaults there first)

'----
Private Sub Workbook_Open()
Worksheets("Sheet1").ScrollArea = "A1:B100"
End Sub
'---
 
Top