Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default how to confine the range of movement of cursor

for example, if i just want to let the cursor in worksheet move from column
A to V and / or row 1 to 50,
how to setup?


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default how to confine the range of movement of cursor

Here is some VBA top do it

Dim oldCell As Range

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Row 50 Or Target.Column 22 Then
If Not oldCell Is Nothing Then
oldCell.Activate
Else
Me.Range("A1").Activate
End If
Else
Set oldCell = Target
End If
End Sub

'This is worksheet event code, which means that it needs to be
'placed in the appropriate worksheet code module, not a standard
'code module. To do this, right-click on the sheet tab, select
'the View Code option from the menu, and paste the code in.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"starwil" wrote in message
...
for example, if i just want to let the cursor in worksheet move from

column
A to V and / or row 1 to 50,
how to setup?




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default how to confine the range of movement of cursor

thanks for reply,
how to activate the VBA,
if not use VBA, excel have function key to do that?
"starwil" ¦b¶l¥ó ¤¤¼¶
¼g...
for example, if i just want to let the cursor in worksheet move from

column
A to V and / or row 1 to 50,
how to setup?




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 70
Default how to confine the range of movement of cursor

Grüezi starwil

starwil schrieb am 24.05.2004

for example, if i just want to let the cursor in worksheet move from column
A to V and / or row 1 to 50,
how to setup?


Just hide the non-used cells/rows.

--
Regards

Thomas Ramel
- MVP for Microsoft-Excel -

[Win XP Pro SP-1 / xl2000 SP-3]
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default how to confine the range of movement of cursor

i know this function, i just want to lock the scrolling and movement of
cursor after certain column, and keep the cell unhide, so hide some cells is
not suitable.....

"Thomas Ramel"
t...
Grüezi starwil

starwil schrieb am 24.05.2004

for example, if i just want to let the cursor in worksheet move from

column
A to V and / or row 1 to 50,
how to setup?


Just hide the non-used cells/rows.

--
Regards

Thomas Ramel
- MVP for Microsoft-Excel -

[Win XP Pro SP-1 / xl2000 SP-3]





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default how to confine the range of movement of cursor

You can use the ScrollArea property of the Worksheet to restrict
the user to a range of cells. E.g.,

ActiveSheet.ScrollArea = "$A$1:$G$10"


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"starwil" wrote in message
...
i know this function, i just want to lock the scrolling and

movement of
cursor after certain column, and keep the cell unhide, so hide

some cells is
not suitable.....

"Thomas Ramel"
t...
Grüezi starwil

starwil schrieb am 24.05.2004

for example, if i just want to let the cursor in worksheet

move from
column
A to V and / or row 1 to 50,
how to setup?


Just hide the non-used cells/rows.

--
Regards

Thomas Ramel
- MVP for Microsoft-Excel -

[Win XP Pro SP-1 / xl2000 SP-3]





  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default how to confine the range of movement of cursor

but i don't want to use VBA
i just want to know whether this is function key in excel
"Chip Pearson" ¼¶¼g©ó¶l¥ó·s»D
...
You can use the ScrollArea property of the Worksheet to restrict
the user to a range of cells. E.g.,

ActiveSheet.ScrollArea = "$A$1:$G$10"


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"starwil" wrote in message
...
i know this function, i just want to lock the scrolling and

movement of
cursor after certain column, and keep the cell unhide, so hide

some cells is
not suitable.....

"Thomas Ramel"
t...
Grüezi starwil

starwil schrieb am 24.05.2004

for example, if i just want to let the cursor in worksheet

move from
column
A to V and / or row 1 to 50,
how to setup?

Just hide the non-used cells/rows.

--
Regards

Thomas Ramel
- MVP for Microsoft-Excel -

[Win XP Pro SP-1 / xl2000 SP-3]







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
cursor movement jed24 New Users to Excel 3 January 26th 10 06:24 AM
how can I limit cursor movement within specified range in excel? slk0217 Excel Discussion (Misc queries) 2 January 5th 08 06:03 AM
cursor movement crissy Excel Worksheet Functions 3 June 30th 06 09:41 PM
Cursor movement JeffH Excel Discussion (Misc queries) 1 February 23rd 06 09:57 PM
Cursor movement Ann Calantzis Excel Worksheet Functions 1 May 25th 05 04:18 PM


All times are GMT +1. The time now is 05:56 AM.

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

About Us

"It's about Microsoft Excel"