Restrict Scrolling? Possible?

NickyT

New Member
Joined
Mar 20, 2009
Messages
7
Hello,

Because my last question was successful, i'd thought i'd ask another.

Is it possible to stop a user scrolling beyond a specific row/column?

For example, my spreadsheet has all its information within the cell range A1:L16, so there is no need for any other cells to be scrollable.

Anyone know the code (if any) behind this? and instruction on where i place the code? in the VBA editor. ("ThisWorkbook"?)

Thank you,
Nicky.
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
Try this: right click the sheet tab, select View Code and paste in

Code:
Private Sub Worksheet_Activate()
Me.ScrollArea = "A1:L16"
End Sub
 
Upvote 0
In the VBA Editor select the worksheet so as it's properties are displayed and there is a field where you can define the scroll area of the sheet.

Dom
 
Upvote 0
Just a side note: If you use Domski's approach, you will need to reset it each time the workbook is opened. For some strange reason, this change is not permanet.

lenze
 
Upvote 0
Just a side note: If you use Domski's approach, you will need to reset it each time the workbook is opened. For some strange reason, this change is not permanet.

lenze

:confused: What a pointless setting!!! Never used it myself so hadn't found that problem.
 
Upvote 0

Forum statistics

Threads
1,213,532
Messages
6,114,177
Members
448,554
Latest member
Gleisner2

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