Link to home
Start Free TrialLog in
Avatar of Dagor
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?
Avatar of bobbit31
bobbit31
Flag of United States of America image

not sure if this would work:
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)
Avatar of Dagor
Dagor

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
Avatar of Frog357
Frog357

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Dagor

ASKER

still get the following

Run-Time Error '62'

Input past end of file  

Example of file:

V,HVPYOU1
     ,,U
W,HW00101
Avatar of Dagor

ASKER

Have to take that back, I still had the file for input rather than binary.....

Frog357's answer worked