Scrolling around a spreadsheet

Brutium

Board Regular
Joined
Mar 27, 2009
Messages
188
A quick question.

Is there a way to limit the number of columns and rows that a user will see and therefore limit the scrolling in a spreadsheet?

Thank you
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
Try like this

Code:
Sub dtest()
ActiveSheet.ScrollArea = "A1:G12"
End Sub
 
Upvote 0
Hello VoG,
I tried to apply the macro in my spreadsheet, I went to Developer > Visual Basic > Sheet1 > Worksheet (in right hand side), and modified the macro to

Sub dtest()
ActiveSheet.ScrollArea = "A1:S82"
End Sub

But nothing happens. I saved the file as a .xlsm file, restarted the program, but nothing. All is the same.
 
Upvote 0
Developer > Visual Basic > Insert > Module. Then paste in the code then run dtest.
 
Upvote 0
Good morning VoG,
I did what you suggested, and it works as long as I manually I run the macro. Is there a way, other than creating a button, to run the macro automatically as I start the macro enabled spreadsheet?
 
Upvote 0
Try like this in the ThisWorkbook module

Code:
Private Sub Workbook_Open()
Sheets("Sheet1").ScrollArea = "A1:S82"
End Sub
 
Upvote 0

Forum statistics

Threads
1,216,523
Messages
6,131,151
Members
449,626
Latest member
Stormythebandit

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