How to set variable scroll area?

Drey

New Member
Joined
Apr 13, 2009
Messages
3
I'm trying to figure out a way to make the scroll area on a sheet variable. Currently, I have a drop down which uses smallscroll to navigate between a set of charts on a sheet. Once that routine has run though, I would like to lock the scroll area so that the user cannot scroll up and down past the selected charts. However, if the dropdown is changed, the scroll area also needs to change.

I've tried inserting the correct scroll areas at the end of each case statement, but this only seems to work for the first case encountered, i.e. Excel sets the scroll area and will not change it if a new case is selected.

Essentially, what I may looking for a is a way to reset the scroll area (or clear it from the active sheet's properties) to the entire sheet and then lock it again. I tried doing .scrollarea="" followed by .scrollarea="whatever it needs to be" but the scrollarea doesn't get reset.

Also, hiding rows is not an option...

Thanks!
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
That was my impression too. However, when i do something like:

.ScrollArea = ""
.ScrollArea = "$A$1:$S$25"

after having done something like:

.ScrollArea = ""
.ScrollArea = "$A$25:$S$50"

the scroll area remains locked at $A$25:$S$50. I have to manually clear it out of the sheet's properties window to set anything else to be the scroll area.

Any ideas?

Thanks!
 
Upvote 0
Got it figured out, I wasn't clearing it before trying to scroll..oops.

Thanks for your help!
 
Upvote 0

Forum statistics

Threads
1,214,923
Messages
6,122,289
Members
449,077
Latest member
Rkmenon

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