[RESOLVED] Ordering of data
Code:
For i = 0 To txtInfo.Count - 1
If Not txtInfo(i) = vbNullString Then
Print #filenum, lblinfo(i) & " " & txtInfo(i)
strbuffer = strbuffer + vbCrLf + lblinfo(i).Caption & " " & txtInfo(i).Text
End If
Next i
For i = 0 To cmbInfo.Count - 1
If Not cmbInfo(i) = vbNullString Then
Print #filenum, lblsm(i) & " " & cmbInfo(i)
strbuffer = strbuffer + vbCrLf + lblsm(i).Caption & " " & cmbInfo(i).Text
End If
Next i
That is the code i am using at the moment to write some stuff to a text file (don't worry to much about strbuffer thats for the clipboard) now what i need is to print the data to the text file but ordered in such a way that cmbinfo(0 and 1) are positioned in the middle of the txtInfo(i) control array.
So the output would be...
txtInfo(0)
txtInfo(1)
txtInfo(2)
txtInfo(3)
txtInfo(4)
cmbInfo(0)
cmbInfo(1)
txtInfo(5)
...
Just to remind you guys i cant add both control arrays together as they aren't identical controls.
Any ideas? I need this as soon as possible! Otherwise i will have to remove the control array and do it a much slower way :(
Re: [RESOLVED] Ordering of data
Good show, Paul. I realize you marked the post resolved, but based on your original order condition for writing the information as shown in Post #1, I think you want "If i = 5 Then" rather than "If i = 3 Then" on the third line.
Just my $0.02.
Re: [RESOLVED] Ordering of data
Nah sorry that was just a total example :)