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

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
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
 
Upvote 0

Forum statistics

Threads
1,214,391
Messages
6,119,249
Members
448,879
Latest member
oksanana

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
Back
Top