Open txt file using vba code

  • Thread starter Thread starter tom
  • Start date Start date
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.
 
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.
 
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.
 
Back
Top