cursor behavious when restricting selection to unlocked cells

K

kaininito

Hi

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 the cursor now shows strange behaviour, which is
quite annoying:

*** 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)

Is it possible to prevent this?
I think I am not the only one who often keeps the "up" or the "left"
key pressed until reaching the top/left, but with this cursor behaviour
the cursor jumps to where I don´t want it to go.

Thanks
Kai
 
P

Peter

Hi,

Instead of using the vba-code, you could try setting the sheets properties.
This might be easyer.
Also check out the cell's properties, they might be set the wrong way.

Regards,
Peter
"kaininito" <[email protected]> schreef in bericht
Hi

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 the cursor now shows strange behaviour, which is
quite annoying:

*** 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)

Is it possible to prevent this?
I think I am not the only one who often keeps the "up" or the "left"
key pressed until reaching the top/left, but with this cursor behaviour
the cursor jumps to where I don´t want it to go.

Thanks
Kai
 
K

kaininito

Hi Peter,
thanks for answering.

Could you elaborate which properties you are referring to?
 
T

Tom Ogilvy

What do you want the cursor to do. I don't see anything strange in the
behavior.

--
Regards,
Tom Ogilvy

Hi

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 the cursor now shows strange behaviour, which is
quite annoying:

*** 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)

Is it possible to prevent this?
I think I am not the only one who often keeps the "up" or the "left"
key pressed until reaching the top/left, but with this cursor behaviour
the cursor jumps to where I don´t want it to go.

Thanks
Kai
 
K

kaininito

When the cursor is, for example in row 20 and I want to go to row 1, I
want to be able to keep the "up" direction key pressed until reaching
row 1.

With EnableSelection = xlUnlockedCells the cursor does not stop at the
top of the page (row 1). Once the cursor is in row 1 and "up" is
pressed again, it jumps down to row 200 (for example).

Same for column A, if the "left" key is pressed with the cursor in
column A, it jumps to column AH (for example).

Kai
 

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