Christopher, can you adapt my code at
http://ca.geocities.com/b_davidso/Web_Page_Files/Excel/extract_text_files.html
This was in response to the following question:
Q - I have an Excel Template file (report.xlt) and text files (1.txt, 2.txt, 3.txt etc - 45 of this text files) in the same directory. What I need to do is:
open my Report.xlt file
open 1.txt
copy and paste special (values only) some data from 1.txt to Report.xlt
save Report.xlt with the copied data as a 1.xls, 2.xls, 3.xls (etc) file
close 1.txt without saving it
Repeat step 2 - 5 as many times as many text files I will have (sometime only 5 and other times 105).
when I am done with this copying and saving I need to print ALL my 1.xls thru let say 45.xls files.
I would like to accomplish this by assigning a macro to a button on my tool bar. Currently I am doing this manually 1 file at the time. I would like to just activate my macro and walk away.
Hope this helps.
Regards,
BarrieBarrie Davidson
Thanks alot. From looking at it I think I can get it to work. I'll let you know. Thanks again.
Yup. Your code works great. I just had to make a couple of adjustments to have all the data end up in one excel file. Thanks a million!