#1   Report Post  
Posted to microsoft.public.excel.setup
external usenet poster
 
Posts: 46
Default Setting custom Tab order

I am building a form in Excel 2003. I want to be able to hit the tab key (or
any key / combination of keys) to automatically move to the next input field
in the form. Is it possible to create a custom tab order or to create a
macro to do this for me? If yes, can you help me do it or at least point me
in the right direction?

Thanks a ton for your help!

Rusty
  #2   Report Post  
Posted to microsoft.public.excel.setup
external usenet poster
 
Posts: 10,593
Default Setting custom Tab order

All you need to do is to unlock the cells you want to move into
(FormatCellsProtection), and protect the worksheet.

If you want some exotic order regardless, see
http://xldynamic.com/source/xld.xlFAQ0008.html

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Rusty" wrote in message
...
I am building a form in Excel 2003. I want to be able to hit the tab key
(or
any key / combination of keys) to automatically move to the next input
field
in the form. Is it possible to create a custom tab order or to create a
macro to do this for me? If yes, can you help me do it or at least point
me
in the right direction?

Thanks a ton for your help!

Rusty



  #3   Report Post  
Posted to microsoft.public.excel.setup
external usenet poster
 
Posts: 22,906
Default Setting custom Tab order

Rusty

If any of these options at Bob's site aren't what you want, you can use VBA
event code to leap from cell to cell in the order you want as you enter data.

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

Or this more robust code from Anne Troy.

Private Sub Worksheet_Change(ByVal Target As Range)
'Anne Troy 's taborder event code
Dim aTabOrd As Variant
Dim i As Long

'Set the tab order of input cells
aTabOrd = Array("A5", "B5", "C5", "A10", "B10", "C10")

'Loop through the array of cell address
For i = LBound(aTabOrd) To UBound(aTabOrd)
'If the cell that's changed is in the array
If aTabOrd(i) = Target.Address(0, 0) Then
'If the cell that's changed is the last in the array
If i = UBound(aTabOrd) Then
'Select first cell in the array
Me.Range(aTabOrd(LBound(aTabOrd))).Select
Else
'Select next cell in the array
Me.Range(aTabOrd(i + 1)).Select
End If
End If
Next i

End Sub


Gord Dibben MS Excel MVP

On Wed, 16 May 2007 21:47:01 -0700, Rusty
wrote:

I am building a form in Excel 2003. I want to be able to hit the tab key (or
any key / combination of keys) to automatically move to the next input field
in the form. Is it possible to create a custom tab order or to create a
macro to do this for me? If yes, can you help me do it or at least point me
in the right direction?

Thanks a ton for your help!

Rusty


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
setting order in excel M Kirwin Excel Discussion (Misc queries) 2 October 31st 06 08:58 AM
custom paper size setting Boyd New Users to Excel 4 August 26th 05 06:14 AM
Custom Auto Filter default setting should be contains dmc Excel Worksheet Functions 0 June 14th 05 07:54 AM
Custom lists - not following defined order [email protected] Excel Worksheet Functions 1 February 21st 05 12:49 PM
Setting custom chart causes plot area to collapse Chiara Charts and Charting in Excel 0 January 20th 05 05:32 PM


All times are GMT +1. The time now is 03:23 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"