ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Tab order help (https://www.excelbanter.com/excel-worksheet-functions/164284-tab-order-help.html)

kfaulkner

Tab order help
 
I have used the following information to create a tab oder in a form I have
created. I copied the code to the VBA and it is still not working correctly.
On my form I have 8 fields only that I have unlocked and only these 8 fields
do I want editting possible. Am I doing something wrong? Also I need to
share this with other users. Thank you Kasey


I have copied the code and it does not work still.
I do not even understand what the code is actually tyring to say there.

Can you give me a possible breakdown of what is going on?

"Mike" wrote:

try this

http://www.vbaexpress.com/kb/getarticle.php?kb_id=209

"morrisli" wrote:

I have exactly the saem question as Tdalhman yesterday!
I've created a form where I would like to select the order of the cells when
users tab to the next question, ie to go down then across or whatever, rather
than keep with the default of across.

Can anyone help?
--
morrisli



Barb Reinhardt

Tab order help
 
Please post your code and tell us exactly what you want to do.
Thanks,
Barb Reinhardt



"kfaulkner" wrote:

I have used the following information to create a tab oder in a form I have
created. I copied the code to the VBA and it is still not working correctly.
On my form I have 8 fields only that I have unlocked and only these 8 fields
do I want editting possible. Am I doing something wrong? Also I need to
share this with other users. Thank you Kasey


I have copied the code and it does not work still.
I do not even understand what the code is actually tyring to say there.

Can you give me a possible breakdown of what is going on?

"Mike" wrote:

try this

http://www.vbaexpress.com/kb/getarticle.php?kb_id=209

"morrisli" wrote:

I have exactly the saem question as Tdalhman yesterday!
I've created a form where I would like to select the order of the cells when
users tab to the next question, ie to go down then across or whatever, rather
than keep with the default of across.

Can anyone help?
--
morrisli



Gord Dibben

Tab order help
 
The code is from Anne Troy and is sheet event code.

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

Code is placed into the sheet module by right-click on the sheet tab and "View
Code"

Paste into that module.


Gord Dibben MS Excel MVP

On Wed, 31 Oct 2007 10:30:00 -0700, Barb Reinhardt
wrote:

Please post your code and tell us exactly what you want to do.
Thanks,
Barb Reinhardt



"kfaulkner" wrote:

I have used the following information to create a tab oder in a form I have
created. I copied the code to the VBA and it is still not working correctly.
On my form I have 8 fields only that I have unlocked and only these 8 fields
do I want editting possible. Am I doing something wrong? Also I need to
share this with other users. Thank you Kasey


I have copied the code and it does not work still.
I do not even understand what the code is actually tyring to say there.

Can you give me a possible breakdown of what is going on?

"Mike" wrote:

try this

http://www.vbaexpress.com/kb/getarticle.php?kb_id=209

"morrisli" wrote:

I have exactly the saem question as Tdalhman yesterday!
I've created a form where I would like to select the order of the cells when
users tab to the next question, ie to go down then across or whatever, rather
than keep with the default of across.

Can anyone help?
--
morrisli




Barb Reinhardt

Tab order help
 
I looked at that code, but it would be useful to know if it's exactly the
same as what's there or a modification of it. It's also possible that the
code is not in the worksheet module, but in another module. Also, If the
changed cell address isn't in the array, it appears to go down to the next
cell.

Barb Reinhardt


"Gord Dibben" wrote:

The code is from Anne Troy and is sheet event code.

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

Code is placed into the sheet module by right-click on the sheet tab and "View
Code"

Paste into that module.


Gord Dibben MS Excel MVP

On Wed, 31 Oct 2007 10:30:00 -0700, Barb Reinhardt
wrote:

Please post your code and tell us exactly what you want to do.
Thanks,
Barb Reinhardt



"kfaulkner" wrote:

I have used the following information to create a tab oder in a form I have
created. I copied the code to the VBA and it is still not working correctly.
On my form I have 8 fields only that I have unlocked and only these 8 fields
do I want editting possible. Am I doing something wrong? Also I need to
share this with other users. Thank you Kasey


I have copied the code and it does not work still.
I do not even understand what the code is actually tyring to say there.

Can you give me a possible breakdown of what is going on?

"Mike" wrote:

try this

http://www.vbaexpress.com/kb/getarticle.php?kb_id=209

"morrisli" wrote:

I have exactly the saem question as Tdalhman yesterday!
I've created a form where I would like to select the order of the cells when
users tab to the next question, ie to go down then across or whatever, rather
than keep with the default of across.

Can anyone help?
--
morrisli




Gord Dibben

Tab order help
 
True.

I guess we'll wait for OP to get back with the exact code used and where it is
stored.


Thanks, Gord

On Wed, 31 Oct 2007 11:36:00 -0700, Barb Reinhardt
wrote:

I looked at that code, but it would be useful to know if it's exactly the
same as what's there or a modification of it. It's also possible that the
code is not in the worksheet module, but in another module. Also, If the
changed cell address isn't in the array, it appears to go down to the next
cell.

Barb Reinhardt


"Gord Dibben" wrote:

The code is from Anne Troy and is sheet event code.

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

Code is placed into the sheet module by right-click on the sheet tab and "View
Code"

Paste into that module.


Gord Dibben MS Excel MVP

On Wed, 31 Oct 2007 10:30:00 -0700, Barb Reinhardt
wrote:

Please post your code and tell us exactly what you want to do.
Thanks,
Barb Reinhardt



"kfaulkner" wrote:

I have used the following information to create a tab oder in a form I have
created. I copied the code to the VBA and it is still not working correctly.
On my form I have 8 fields only that I have unlocked and only these 8 fields
do I want editting possible. Am I doing something wrong? Also I need to
share this with other users. Thank you Kasey


I have copied the code and it does not work still.
I do not even understand what the code is actually tyring to say there.

Can you give me a possible breakdown of what is going on?

"Mike" wrote:

try this

http://www.vbaexpress.com/kb/getarticle.php?kb_id=209

"morrisli" wrote:

I have exactly the saem question as Tdalhman yesterday!
I've created a form where I would like to select the order of the cells when
users tab to the next question, ie to go down then across or whatever, rather
than keep with the default of across.

Can anyone help?
--
morrisli






All times are GMT +1. The time now is 11:27 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com