air1access
Technical User
I have a text file that is space delimited - the problem is the spaces are uneven/different widths or what not... This creates problems with my import spec.. How can I use VB to make the spaces between the values on each line even & line the columns up on the text file..?
What I have posted below is not what I'm working with - but I'm messing with the code structure to get it to work, and I'm striking out..!! I know that I need to maybe use the "mid" function, or maybe the "split" function...??? Look for the spaces in each line and move the values accordingly to get everything to line up in nice & even columns...
Any suggestions/idea/examples..?
Thanks in advance..!!!
air1access
Do Until EOF(1)
Line Input #1, strLine
If Left(strLine, 2) = "E " _
Or Left(strLine, 2) = "S " Then
strType = strLine
Print #2, strType
End If
Loop
Close #1
Close #2
What I have posted below is not what I'm working with - but I'm messing with the code structure to get it to work, and I'm striking out..!! I know that I need to maybe use the "mid" function, or maybe the "split" function...??? Look for the spaces in each line and move the values accordingly to get everything to line up in nice & even columns...
Any suggestions/idea/examples..?
Thanks in advance..!!!
air1access
Do Until EOF(1)
Line Input #1, strLine
If Left(strLine, 2) = "E " _
Or Left(strLine, 2) = "S " Then
strType = strLine
Print #2, strType
End If
Loop
Close #1
Close #2