View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Sheeloo[_3_] Sheeloo[_3_] is offline
external usenet poster
 
Posts: 1,805
Default A Macro that gets data from an ASCII file

Go to TOOLS|Macro
Start recording a macro
Choose name

Choode File|Open
Select your file
Make your choices in the import wizard

Stop recording your macro

Tools|Macro|Macros
Select your macro and click EDIT

You have your macro
Now you can adapt it

"Boris" wrote:

All,

I would like to write a Macro that does the following:

1. Opens an ASCII file (e.g. a *.txt or *.raw file)
2. Copies the data from the ASCII file into the Excel file.
Every line from the ASCII line should be inserted into a new row
3. closes the file

Could someone tell me how to do this?

Best,