linking Excel to txt file

  • Thread starter Thread starter Andy
  • Start date Start date
A

Andy

I have a spreadsheet in which I need to import data that
currently resides in a .txt file. I would imagine that I
need to create some sort of link between the .xls and .txt
formats and then create a macro that subsequently pulls in
all pertinent data, but I am at a loss as how to begin
this process.

Any and all insights are welcome.

thanks.
 
One way is to open the text file with various vba commands you can learn
about in Help! Search for "Input", "Line Input", and "Open Statement".
That should get you started.

Otherwise, you can open the text file as a workbook. Use the macro recorder
to get the code for this.

HTH,
Shockley
 
All I ever did was first under the Tools menu, go to
Macro/Record New Macro. Then under the Data menu, go to
Get External Data/Import Text File. Choose your settings,
when finished go back to the Tools menu/Macros/Stop
Recording. Then right click the data to set up your
refresh options.

rc
 
Back
Top