Private Sub Worksheet_Change(ByVal Target As Range)
'Rob Abel
'050315 0319
Dim taborder As Variant
Dim i As Long
Application.EnableEvents = False
taborder = Array("d3", "I3", "v3", "l5", "v5", "e7", "n7", "t7", "i9", "q9", "w9", _
"c10", "o10", "c16", "i16", "s17", "e19", "d21", "c23", "i23", "k23", "q19", "p21", "o23", "u23", "w23", "d25", "l25", "s25", "e27", "k27", "o27", "t27", "d31", "j31", "n31", "t31", "f33", "f37", "j37", "m37", "f39", "j39", "m39", "f41", "j41", "q36", "q38", "n40", "s40", "q44")
i = -1
On Error Resume Next
i = Application.WorksheetFunction.Match(Target.Address(0, 0), taborder, 0) - 1
On Error GoTo 0
If i = -1 Then GoTo skip
If i < UBound(taborder) Then Range(taborder(i + 1)).Select Else Range(taborder(0)).Select
skip:
Application.EnableEvents = True
End Sub
Help!
I am using the above code to navigate through a form in ms excel 03 for a sales department. Problem is that if you wish to skip one of these cells you can’t just use the TAB key. You have to hit spacebar followed by the tab key. Also the "SHIFT+TAB" function for reversing within the tab order is not working. Any ideas?
Thanks
'Rob Abel
'050315 0319
Dim taborder As Variant
Dim i As Long
Application.EnableEvents = False
taborder = Array("d3", "I3", "v3", "l5", "v5", "e7", "n7", "t7", "i9", "q9", "w9", _
"c10", "o10", "c16", "i16", "s17", "e19", "d21", "c23", "i23", "k23", "q19", "p21", "o23", "u23", "w23", "d25", "l25", "s25", "e27", "k27", "o27", "t27", "d31", "j31", "n31", "t31", "f33", "f37", "j37", "m37", "f39", "j39", "m39", "f41", "j41", "q36", "q38", "n40", "s40", "q44")
i = -1
On Error Resume Next
i = Application.WorksheetFunction.Match(Target.Address(0, 0), taborder, 0) - 1
On Error GoTo 0
If i = -1 Then GoTo skip
If i < UBound(taborder) Then Range(taborder(i + 1)).Select Else Range(taborder(0)).Select
skip:
Application.EnableEvents = True
End Sub
Help!
I am using the above code to navigate through a form in ms excel 03 for a sales department. Problem is that if you wish to skip one of these cells you can’t just use the TAB key. You have to hit spacebar followed by the tab key. Also the "SHIFT+TAB" function for reversing within the tab order is not working. Any ideas?
Thanks