Dagor
asked on
Remove EOF markers from text file
I am working with a text dump from a legacy system. Te output file is loaded with EOF markers. I keep getting a error 62. Any suggestions?
ASKER
Already tried that, it gives the can't read passed EOF err.62 before you can get to the point to replace it.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
still get the following
Run-Time Error '62'
Input past end of file
Example of file:
V,HVPYOU1
,,U
W,HW00101
Run-Time Error '62'
Input past end of file
Example of file:
V,HVPYOU1
,,U
W,HW00101
ASKER
Have to take that back, I still had the file for input rather than binary.....
Frog357's answer worked
Frog357's answer worked
Dim ff as integer
ff = freefile
Dim strText as string
open "C:\my documents\test.txt" for input as #ff
strText = Input (LOF(ff), #ff)
strText = Replace(strText, "<EOF char, which i don't know off hand>", "<another char>")
close(ff)