I am trying to read through a text file using the following code:
Dim id, buffer As String
Dim amount as Variant
Open "c:\mytext.txt" For Input Access Read As #1
While Not EOF(1)
Input #1, id, amount, buffer
[do other stuff]
Wend
The text file looks like:
784118879,1,YYYYMMDD
A6893408,1,YYYYMMDD
929M06201,1,YYYYMMDD
GENERAL,1,YYYMMDD
The above reads the input file correctly for all except the third line, where the field is a number followed by text. In that case it only reads the numbers until the first letter. (ie returns 929)
Any ideas what is going on?
Dim id, buffer As String
Dim amount as Variant
Open "c:\mytext.txt" For Input Access Read As #1
While Not EOF(1)
Input #1, id, amount, buffer
[do other stuff]
Wend
The text file looks like:
784118879,1,YYYYMMDD
A6893408,1,YYYYMMDD
929M06201,1,YYYYMMDD
GENERAL,1,YYYMMDD
The above reads the input file correctly for all except the third line, where the field is a number followed by text. In that case it only reads the numbers until the first letter. (ie returns 929)
Any ideas what is going on?