Scroll problem in Excel sheet

G

Guest

In one of worksheet, the sheet is protected. Locked cells can not be selected.
I have freezed the row and column both. At the extreme left and right
columns of sheet are locked, therfore cant be selected.
Sheet size is more than one screen. Now when I scroll from left to right
thru arrow keys, the scroll restarts automatically from the first selectable
column on screen-1, when it reaches at thelast selectable column on
subsequent screens.

How to stop the scroll when at the last selectable column?
Can anybody plz help me?
Thanks in advance.
 
D

Dave Peterson

You could hide rows/columns so that the user can't even see them.

Or you could set the ScrollArea to be what you want--each time you open the
workbook:

Option Explicit
Sub auto_open()
With Worksheets("sheet1")
.Protect Password:="hi"
' .EnableSelection = xlUnlockedCells
.ScrollArea = .Range("a1:f22").Address
End With
End Sub

Excel won't remember these settings after you close it and reopen the workbook
(that's why it's in auto_open).

If you want to keep the users from selecting locked cells, too, then uncomment
that line in the middle.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top