linking Excel to txt file

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.
 
S

shockley

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
 
R

Rhonda

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
 

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