Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Control Cursor movement with Tab

I have created a form with Excel. I need to know if I can plan the path of
the cursor so that when the user presses Tab, the cursor goes to a
predetermined cell (Or group of cells) rather than just move logically to the
next unprotected cell.

Thank you
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Control Cursor movement with Tab

See Bob Phillips' site for info on using a named range.

http://www.xldynamic.com/source/xld.xlFAQ0008.html

There is also sheet_change code that will leap around in any order you like.

If you want an example of that, post back.


Gord Dibben MS Excel MVP

On Fri, 29 Dec 2006 10:30:01 -0800, Costi
wrote:

I have created a form with Excel. I need to know if I can plan the path of
the cursor so that when the user presses Tab, the cursor goes to a
predetermined cell (Or group of cells) rather than just move logically to the
next unprotected cell.

Thank you


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Control Cursor movement with Tab

Thanks Gord, could you please provide the example of the Sheet_change code?
Costi

"Gord Dibben" wrote:

See Bob Phillips' site for info on using a named range.

http://www.xldynamic.com/source/xld.xlFAQ0008.html

There is also sheet_change code that will leap around in any order you like.

If you want an example of that, post back.


Gord Dibben MS Excel MVP

On Fri, 29 Dec 2006 10:30:01 -0800, Costi
wrote:

I have created a form with Excel. I need to know if I can plan the path of
the cursor so that when the user presses Tab, the cursor goes to a
predetermined cell (Or group of cells) rather than just move logically to the
next unprotected cell.

Thank you



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Control Cursor movement with Tab

Surely can.

Private Sub Worksheet_Change(ByVal Target As Range)
Select Case Target.Address
Case "$C$2"
Range("C5").Select
Case "$C$5"
Range("E2").Select
Case "$E$2"
Range("E5").Select
End Select
End Sub

Just keep adding cases and ranges.


Gord

On Fri, 29 Dec 2006 14:26:01 -0800, Costi
wrote:

Thanks Gord, could you please provide the example of the Sheet_change code?
Costi

"Gord Dibben" wrote:

See Bob Phillips' site for info on using a named range.

http://www.xldynamic.com/source/xld.xlFAQ0008.html

There is also sheet_change code that will leap around in any order you like.

If you want an example of that, post back.


Gord Dibben MS Excel MVP

On Fri, 29 Dec 2006 10:30:01 -0800, Costi
wrote:

I have created a form with Excel. I need to know if I can plan the path of
the cursor so that when the user presses Tab, the cursor goes to a
predetermined cell (Or group of cells) rather than just move logically to the
next unprotected cell.

Thank you




  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 361
Default Control Cursor movement with Tab

Gord,

I use Office XP (Excel XP), I tried both of the methods detailed in this
thread and neither one worked for me. I tried the "case select" with
protection on and I tried the "named range" with protection both on and off.
What am I doing wrong?

"Gord Dibben" wrote:

Surely can.

Private Sub Worksheet_Change(ByVal Target As Range)
Select Case Target.Address
Case "$C$2"
Range("C5").Select
Case "$C$5"
Range("E2").Select
Case "$E$2"
Range("E5").Select
End Select
End Sub

Just keep adding cases and ranges.


Gord

On Fri, 29 Dec 2006 14:26:01 -0800, Costi
wrote:

Thanks Gord, could you please provide the example of the Sheet_change code?
Costi

"Gord Dibben" wrote:

See Bob Phillips' site for info on using a named range.

http://www.xldynamic.com/source/xld.xlFAQ0008.html

There is also sheet_change code that will leap around in any order you like.

If you want an example of that, post back.


Gord Dibben MS Excel MVP

On Fri, 29 Dec 2006 10:30:01 -0800, Costi
wrote:

I have created a form with Excel. I need to know if I can plan the path of
the cursor so that when the user presses Tab, the cursor goes to a
predetermined cell (Or group of cells) rather than just move logically to the
next unprotected cell.

Thank you






  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 361
Default Control Cursor movement with Tab

Gord, I don't know what changed but the "case select" method is working now.

"Gord Dibben" wrote:

Surely can.

Private Sub Worksheet_Change(ByVal Target As Range)
Select Case Target.Address
Case "$C$2"
Range("C5").Select
Case "$C$5"
Range("E2").Select
Case "$E$2"
Range("E5").Select
End Select
End Sub

Just keep adding cases and ranges.


Gord

On Fri, 29 Dec 2006 14:26:01 -0800, Costi
wrote:

Thanks Gord, could you please provide the example of the Sheet_change code?
Costi

"Gord Dibben" wrote:

See Bob Phillips' site for info on using a named range.

http://www.xldynamic.com/source/xld.xlFAQ0008.html

There is also sheet_change code that will leap around in any order you like.

If you want an example of that, post back.


Gord Dibben MS Excel MVP

On Fri, 29 Dec 2006 10:30:01 -0800, Costi
wrote:

I have created a form with Excel. I need to know if I can plan the path of
the cursor so that when the user presses Tab, the cursor goes to a
predetermined cell (Or group of cells) rather than just move logically to the
next unprotected cell.

Thank you




  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Control Cursor movement with Tab

Only the one method outlined at Bob's site uses sheet protection and unlocked
cells.

The named range method does need sheet protection.

The Case Select method which is now working for you does not use sheet
protection either.

Gord


On Tue, 20 Feb 2007 12:40:23 -0800, Carl wrote:

Gord, I don't know what changed but the "case select" method is working now.

"Gord Dibben" wrote:

Surely can.

Private Sub Worksheet_Change(ByVal Target As Range)
Select Case Target.Address
Case "$C$2"
Range("C5").Select
Case "$C$5"
Range("E2").Select
Case "$E$2"
Range("E5").Select
End Select
End Sub

Just keep adding cases and ranges.


Gord

On Fri, 29 Dec 2006 14:26:01 -0800, Costi
wrote:

Thanks Gord, could you please provide the example of the Sheet_change code?
Costi

"Gord Dibben" wrote:

See Bob Phillips' site for info on using a named range.

http://www.xldynamic.com/source/xld.xlFAQ0008.html

There is also sheet_change code that will leap around in any order you like.

If you want an example of that, post back.


Gord Dibben MS Excel MVP

On Fri, 29 Dec 2006 10:30:01 -0800, Costi
wrote:

I have created a form with Excel. I need to know if I can plan the path of
the cursor so that when the user presses Tab, the cursor goes to a
predetermined cell (Or group of cells) rather than just move logically to the
next unprotected cell.

Thank you





  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 361
Default Control Cursor movement with Tab

Gord,

Thanks for the quick reply. Now that I know I'm not supposed to use
Worksheet Protection I was all jazzed about finally seeing this work. But...
nothing seems to be controlling the movement of the cursor. Here is my code:

Private Sub Worksheet_Change(ByVal Target As Range)
Select Case Target.Address
Case "$E$5"
Range("E12").Select
Case "$E$12"
Range("E14").Select
Case "$E$14"
Range("E16").Select
Case "$E$16"
Range("E18").Select
Case "$E$18"
Range("E20").Select
Case "$E$20"
Range("E22").Select
Case "$E$22"
Range("O12").Select
Case "$O$12"
Range("O14").Select
Case "$O$14"
Range("O16").Select
Case "$O$16"
Range("O18").Select
Case "$O$18"
Range("V12").Select
Case "$V$12"
Range("V14").Select
Case "$V$14"
Range("V16").Select
Case "$V$16"
Range("V18").Select
Case "$V$18"
Range("R12").Select
Case "$R$12"
Range("R14").Select
Case "$R$14"
Range("R16").Select
Case "$R$16"
Range("R18").Select
Case "$R$18"
Range("X12").Select
Case "$X$12"
Range("X14").Select
Case "$X$14"
Range("X16").Select
Case "$X$16"
Range("X18").Select
Case "$X$18"
Range("E5").Select
End Select
End Sub

One thing I noticed was the Private Sub naming. By default my Visio Studio
provided "Worksheet_SelectionChange(ByVal Target As Range)", but your example
uses "Worksheet_Change". Have I introduced an error? And where can I read
about the function Target.Address?

Thanks again for your assistance.

"Gord Dibben" wrote:

Only the one method outlined at Bob's site uses sheet protection and unlocked
cells.

The named range method does need sheet protection.

The Case Select method which is now working for you does not use sheet
protection either.

Gord


On Tue, 20 Feb 2007 12:40:23 -0800, Carl wrote:

Gord, I don't know what changed but the "case select" method is working now.

"Gord Dibben" wrote:

Surely can.

Private Sub Worksheet_Change(ByVal Target As Range)
Select Case Target.Address
Case "$C$2"
Range("C5").Select
Case "$C$5"
Range("E2").Select
Case "$E$2"
Range("E5").Select
End Select
End Sub

Just keep adding cases and ranges.


Gord

On Fri, 29 Dec 2006 14:26:01 -0800, Costi
wrote:

Thanks Gord, could you please provide the example of the Sheet_change code?
Costi

"Gord Dibben" wrote:

See Bob Phillips' site for info on using a named range.

http://www.xldynamic.com/source/xld.xlFAQ0008.html

There is also sheet_change code that will leap around in any order you like.

If you want an example of that, post back.


Gord Dibben MS Excel MVP

On Fri, 29 Dec 2006 10:30:01 -0800, Costi
wrote:

I have created a form with Excel. I need to know if I can plan the path of
the cursor so that when the user presses Tab, the cursor goes to a
predetermined cell (Or group of cells) rather than just move logically to the
next unprotected cell.

Thank you






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
Control Charts Rhonda Charts and Charting in Excel 5 October 27th 06 05:33 PM
Scroll bars without control tabs CJ Excel Worksheet Functions 3 August 23rd 06 12:55 AM
MultiPage control Patrick Simonds Excel Worksheet Functions 1 August 5th 06 05:32 PM
How to insert date using a pop up calendar control in a cell i Iain the scout Excel Discussion (Misc queries) 4 December 17th 05 08:10 PM
Copying list-box control Excel Discussion (Misc queries) 1 January 6th 05 01:39 AM


All times are GMT +1. The time now is 04:54 PM.

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"