If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
|
Thread Tools | Display Modes |
#11
|
|||
|
|||
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. |
#12
|
|||
|
|||
BIG question
Do you know what annoys me about your posting? The fact that you had to post
it in the first place. I've given that same correction you gave me to others dozens of times in the past myself (both when volunteering here as well as when I volunteered in the compiled VB newsgroups)! I was concentrating on getting the wrap-around effect and completely overlooked the partial match problem (for which I could just kick myself). Anyway, thanks for catching this... I really appreciate it. -- Rick (MVP - Excel) "Harlan Grove" wrote in message ... "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. |
|
Thread Tools | |
Display Modes | |
|
|