read text file

I

iccsi

I need to read a text file using VBA.
Any sample code to open, read, write and close a text file.

Your help is great appreciated,
 
M

Marshall Barton

iccsi said:
I need to read a text file using VBA.
Any sample code to open, read, write and close a text file.


The specific code you would need depends on the nitty gritty
details of the content of the file and exactly what you want
to do with it.

In general, check VBA Help on the FreeFile, Input, Seek,
etc. functions and the Open, Close, Input #, Write #, Line
Input #, Put, Print #, etc. statements.

For a clean .csv kind of file, you may be able to avoid all
the complicated stuff and just link to it almost as if it
were a table in another database.
 

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