Reading a text file

Hi,

I am building a converstion tool to convert a csv to a qif file.
Problem is in the reading loop.

Open "C:\Documents and Settings\LLAL\Desktop\" & File1.FileName For Input As #1
Do While Not EOF(1)
Input #1, Datum, Begunstigde, Rekening, Tegenrekening, Code, AfBij, Bedrag, Boekingstype, Memo
Loop
Close #1

I am getting a runtime error 62 (input past end of file) because my bank institution puts an extra Ascii 10 code at the end of the file.

Can someone tell me how to eliminate that last character in my inputfile? If I delete it by hand the loop works.

Who can help?

Thanks,
Jack
[670 byte] By [Jack2004] at [2007-11-18 16:51:04]
# 1 Re: Reading a text file
You cannot actually delete that except replacing it with a another character (even null) which is the same problem.

I am thinking of using Line Input# instead of Input#. That way you can check first if the line contains only Char-10. If not Char-10, then proceed to split the entire line with Split() Function.
aio at 2007-11-9 23:22:10 >