I am trying to read a .txt file and as I read it in line-by-line, pase the data and append it to the appropriate table either Guests Names, Show Information and Orders. I keep receiving the error...
Runtime Error '62'.
"Input Past End of File."
I tried using the EOF and Lof functions as Microsoft suggests and neither work. Can anyone help.
Here is my code...
Open MyLoc For Input As #1 ' Open file for input.
Do While MyLocation < LOF(1) ' Loop until end of file.
MyLocation = Loc(1)
Input #1, ModeNum, CCName, CCType, CCNo, CCEXP, SUDef1
Debug.Print ModeNum, CCName, CCType, CCNo, CCEXP, SUDef1 ' Print data to the Immediate window.
MyLine = MyLine & Input(1, #1)
Close #1 ' Close file.
Here is the contents of the .txt file...
1,Paul P. Barnes,Mastercard,1111222233334444-555,01/05,11223344556677