Hi All,
This may come across as a rather amateur question but....
If I wanted to read in a normal text file, use the data and then delete the "current record" within the file, how would I go about doing this? At the moment this is what I am trying :
Open "c:\temp\EDI20010521.txt" For Random As #1
While Not EOF(1)
Input #1, test2
FromANA = Mid(test2, 21, 35)
FileSize = Mid(test2, 143, 8)
If FromANA = EDINum Then
totalFileSize = totalFileSize + Val(FileSize)
Delete test2
End If
Wend
However, when I run the app I get an error : "Sub or Function not defined." and the word Delete within my code is highlighted.
I'm flying blind here 'cos i'm not even sure if "Delete" is a valid command, and I can't seem to find much assitance in the reference guide.
This may come across as a rather amateur question but....
If I wanted to read in a normal text file, use the data and then delete the "current record" within the file, how would I go about doing this? At the moment this is what I am trying :
Open "c:\temp\EDI20010521.txt" For Random As #1
While Not EOF(1)
Input #1, test2
FromANA = Mid(test2, 21, 35)
FileSize = Mid(test2, 143, 8)
If FromANA = EDINum Then
totalFileSize = totalFileSize + Val(FileSize)
Delete test2
End If
Wend
However, when I run the app I get an error : "Sub or Function not defined." and the word Delete within my code is highlighted.
I'm flying blind here 'cos i'm not even sure if "Delete" is a valid command, and I can't seem to find much assitance in the reference guide.