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.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
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![]()




Reply With Quote