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

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.

VoG

Legend
Joined
Jun 19, 2002
Messages
63,650
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

Domski

Well-known Member
Joined
Jan 18, 2005
Messages
7,292
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

lenze

Legend
Joined
Feb 18, 2002
Messages
13,690
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

Domski

Well-known Member
Joined
Jan 18, 2005
Messages
7,292
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,190,647
Messages
5,982,116
Members
439,756
Latest member
alice128

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