Excel 2000: Unprotected cells - How to prevent cursor from wrapping?

B

Bertus Theron

I have created a workbook in which I limit cursor movement to unprotected
cells, by using the VBA code

With Worksheets(Sheet.Name)
.EnableSelection = xlUnlockedCells
End With

This works fine but I find the cursor-wrapping behaviour annoying and
confusing, e.g.:
*** when the cursor reaches the right-most unprotected cell in a particular
row,
it wraps to the left-most unprotected cell in the next row (i.e. next
row that contains an unprotected cell)
*** when the cursor reaches the bottom-most unprotected cell in a particular
column,
it wraps to the top-most unprotected cell in the next column (i.e.
next column that contains an unprotected cell)

This is especially confusing if the data on the sheet stretches wider and
longer than the screen, because as the cursor moves, you often find it
jumping suddenly and unwanted to the other end of the data. I would rather
prefer the cursor to stop at the edge of the data. How can I achieve the
desired behaviour.

Regards
Bertus
 
A

AlfD

Hi!

If you are dealing with a single rectangular area, you could use th
worksheet's ScrollArea Property.

Come back if you need more details.

Al
 

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