Scroll lock problems...

Novelec

Board Regular
Joined
Nov 3, 2012
Messages
85
Hi guys,

I'm using VBA to create a scroll lock function on my worksheets.

I am finding that worksheets with hidden rows intermittently deviate from the scroll lock values specified in my code. When this happens, the difference in scroll area is usually very similar to the size of hidden rows, hence my suspicion.

Eg.

- Scroll lock is set to row 500, and no rows are hidden - I can scroll to row 500.
- Scroll lock is set to row 500, there are 50 rows hidden, I can scroll to row 450(ish).

I would have thought if anything, hidden rows would result in being able to scroll further...? Has anyone else had an issue like this before? Any suggestions as to a solution? I've attached the line of code I am using, just in case...

Thanks in advance for any assistance.

Code:
Worksheets("Sheet 1").ScrollArea = "A1:U500"
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.

Forum statistics

Threads
1,136,969
Messages
5,678,874
Members
419,787
Latest member
juanam

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