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.
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"