Reading/Writing Data to a Text File using VBA

A

Anthony

I am aware that I cross-posted (not frowned upon) rather than multi-posted
(frowned upon)

How do I read and write data to a text file?

Also, How do I "query" the text file and have it retreive a specific line,
so I can edit THAT LINE?

example:

What if my text file looks like this:


Bob, 399
Joe, 293
Suzy, 300
Henry, 201
Dufous, 041
Dork, 003


And I want to access the "Suzy" line and change the value from 300 to 293?

How do I do this with VBA?

Grawsheeus
 
G

Geoff

Anthony,

If you wanted to explore a ready-made solution, there is code for a TextFile
class module in the "Access Developers Handbook" by Getz, Litwin and
Gilbert. It's used to introduce the topic of class modules.

Geoff
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top