Thread: BIG question
View Single Post
  #11   Report Post  
Posted to microsoft.public.excel.misc
Harlan Grove[_2_] Harlan Grove[_2_] is offline
external usenet poster
 
Posts: 1,231
Default BIG question

"Rick Rothstein" wrote...
I believe this shorter code will function identically to the code you
posted...

Private Sub Worksheet_Change(ByVal Target As Range)
* ' Set the tab order of input cells in a space delimited list
* Const aTabOrd As String = "A5 B22 C5 A11 D10 F7"
* On Error Resume Next
* Range(Trim(Split(Split(aTabOrd & " " & aTabOrd, Target.Address(0, 0) _
* * * & " ", , vbTextCompare)(1))(0))).Select
End Sub

....

Close. Make the C5 address in aTabOrder AC5 instead, then enter
something in C5. FUBAR!

Make the .Select method call

Range(Trim(Split(Split(" " & aTabOrd & " " & aTabOrd, _
" " & Target.Address(0, 0) & " ", , vbTextCompare)(1))(0))).Select

Delimiters are a pain.