Dynamically limit scroll area of worksheet

MRK_Toledo

New Member
Joined
Sep 2, 2006
Messages
34
I have a workbook with 6 different worksheets.

I would like to limit the scroll area +1 or 2 rows and have this adjust
dynamically according to the amount of data on each worksheet.

Each worksheet is different in size, so a fixed reange for all sheets
will not work.

I have tried to set the scroll area in the properties box for each
worksheet, but this does not give me my +1 or 2 rows, which I
might not REALLY need, but it resets itself after I close then
reopen the workbook.

Any ideas?
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.

Richard Schollar

MrExcel MVP
Joined
Apr 19, 2005
Messages
23,707
Hi

You'll probably want to use some VBA code in the Worksheet code module, something along the lines of:

Code:
Private Sub Worksheet_Activate()
Dim l As Long
l = Range("A65536").End(xlUp).Row + 2
Activesheet.ScrollArea = "$A$1:$IV$" & l
End Sub

and amend the column IV to whatever you want.

Does this help?

Best regards

Richard
 

Forum statistics

Threads
1,141,017
Messages
5,703,752
Members
421,313
Latest member
Mooncake1

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top