Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

WHAT IS THE BEST WAY TO CHANGE TEXT IN THE MIDDLE OF A TEXT FILE? 3

Status
Not open for further replies.

faxpay

Programmer
Nov 30, 2004
119
US
I have an ascii file in a small app that I want to open and delete text and add different text in the middle of the file. I tried using the fso but found out it will not let you work in the middle of a file.

Tom
faxpay
 
strongmn
BobRhodes

Went back did over and works fine. Here it is:

Open "c:\BANK OF AMERICA DIRECT DEPOSIT FILE FOR TRANSMISSION\HTTP ACH PAYRLR CAFR1031" _
For Binary As FileNo
Put #FileNo, InStr(Lineout, Find), Substitute
Close FileNo

Thank You for your persistance in forcing me to take another look. Really the word Novice should be before programmer. I use the limited skills I have in vb6 to do limited programming to keep our little business going. I have developed some software but that was some time ago.

Again thanks. I think this deserves some stars.

faxpay, Tom
 
My pleasure, thanks for the star. As a general point, the more you get in the habit of going after the little details, the less often little details become big problems later on. Not that this one would have; it's more a matter of being in the habit of finding the simplest way possible to accomplish a given task.
 
Glad to hear that you've managed to make progress (both for your business and for yourself)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top