T
Tino
Three example lines of my csv file are..
abc 123,123.4
1 0 002,900.23231
1 0 003,31.12
And it appears to recognise the spaces in the lines as delimeters as
well as the commas.
The purpose of my code is to open a text file and round values in the
second field of each line and the full code is as follows:
mycount = 1
Do While Range("a" & mycount) <> ""
a = "c:\web\" & Range("a" & mycount) & ".csv"
b = "c:\web\" & Range("a" & mycount) & ".txt"
Open a For Input As #1
Open b For Output As #2
b = LCase(b)
Do Until EOF(1)
Input #1, myfirstfield, mysecondfield
mysecondfield = (Int(mysecondfield * 100)) / 100
Print #2, myfirstfield & "," & mysecondfield
Loop
Close
mycount = mycount + 1
Loop
Thanks again.
abc 123,123.4
1 0 002,900.23231
1 0 003,31.12
And it appears to recognise the spaces in the lines as delimeters as
well as the commas.
The purpose of my code is to open a text file and round values in the
second field of each line and the full code is as follows:
mycount = 1
Do While Range("a" & mycount) <> ""
a = "c:\web\" & Range("a" & mycount) & ".csv"
b = "c:\web\" & Range("a" & mycount) & ".txt"
Open a For Input As #1
Open b For Output As #2
b = LCase(b)
Do Until EOF(1)
Input #1, myfirstfield, mysecondfield
mysecondfield = (Int(mysecondfield * 100)) / 100
Print #2, myfirstfield & "," & mysecondfield
Loop
Close
mycount = mycount + 1
Loop
Thanks again.