Hi,
I have a large text file (80 MB) that is downloaded daily. The file has leading text with the source code of the file (about 60 characters).
I have the text file linked to Access, however before I run my queries, I have to open the text file in Notepad and delete the leading text from the file until the words "Item Number,".
I found this code from WayneRyan however it does not work as the file is too big:
I appreciate any help you can give.
Roli001
I have a large text file (80 MB) that is downloaded daily. The file has leading text with the source code of the file (about 60 characters).
I have the text file linked to Access, however before I run my queries, I have to open the text file in Notepad and delete the leading text from the file until the words "Item Number,".
I found this code from WayneRyan however it does not work as the file is too big:
Code:
Dim buffer As String
Open Me.MyFile For Input As #1
Open "C:\Temp.txt" For Output As #2
Line Input #1, buffer
While Not EOF(1) And InStr(1, buffer, "TypeRI") = 0
If EOF(1) Then
MsgBox("Invalid File.")
Close #1
Close #2
Exit Sub
End If
Line Input #1, buffer
Wend
While Not EOF(1)
Print #2, buffer
Line Input #1, buffer
Wend
Close #1
Close #2
Kill Me.MyFile
Name "C:\Temp.txt" As Me.MyFile
MsgBox("Done.")
Roli001