Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default cursor behavious when restricting selection to unlocked cells

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default cursor behavious when restricting selection to unlocked cells

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" schreef in bericht
oups.com...
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


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default cursor behavious when restricting selection to unlocked cells

Hi Peter,
thanks for answering.

Instead of using the vba-code, you could try setting the sheets properties.


Could you elaborate which properties you are referring to?

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default cursor behavious when restricting selection to unlocked cells

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

--
Regards,
Tom Ogilvy

"kaininito" wrote in message
oups.com...
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


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default cursor behavious when restricting selection to unlocked cells

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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
My cursor always in selection mode,wat about other cursor option Deepu[_2_] Excel Discussion (Misc queries) 1 March 2nd 10 01:05 AM
Restricting cell selection Jemwig Excel Discussion (Misc queries) 3 March 16th 09 03:27 PM
Moving from unlocked cells to unlocked cells in an excel form Stacey Lee Excel Worksheet Functions 1 April 24th 06 08:44 PM
Locked spreadsheet, move cursor only to unlocked cells? dhilligoss Excel Worksheet Functions 1 December 5th 05 02:29 PM
Changing active selection cursor Mistaken Creation Excel Discussion (Misc queries) 3 May 27th 05 10:06 PM


All times are GMT +1. The time now is 06:47 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright Đ2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"