View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Ron de Bruin Ron de Bruin is offline
external usenet poster
 
Posts: 11,123
Default copy all text files one by one and run a code.

Hi sermest

See this page
http://www.rondebruin.nl/csv.htm

And Chip's page
http://www.cpearson.com/excel/imptext.htm


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"sermest" wrote in message oups.com...
I copy a text file and then run my code to get it to my database. I
want to do it for all ".txt" files in a specific directory. Lets say my
directory is "c:\bcf"

1. Get the first ".txt" file - copy it to "sheet2"
2. run my code "aging()", which will reorganize the data
3. copy to "sheet1"
4. get the second ".txt" file
5. run my code "aging()"
6. add to "sheet1"
7 and so for all the text files in that directory.

Thanks for your help.

Best,
Mike