Open txt file using vba code

T

tom

In MS-excel2003, when we click on a button we have to open a txt file which
we already assigned.Please suggest vba code for this.
 
D

Dave Peterson

If you're opening a text file, you'll probably want to parse each field
according to rules that only you know.

I'd suggest that you record a macro when you do it manually and you'll have code
that works ok.
 
O

OssieMac

Hi Tom,

You should be able to record a macro to open the file. If you need further
help to modify the recorded code to make it more dynamic to say match a
filename in an existing worksheet or something then post the code you
recorded and describe how you want to make the code more dynamic.
 

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