Opening and saving a file from a macro
Posted by Steve D on May 15, 2001 12:34 PM
I have a process that I do daily that formats text files (saved as .xls) into an Excel worksheets that my users can understand. I have written the macros to format the individual files but I do the same process for multiple files. I spend a ton of time opening a file, running the macro and then saving the file. The issue Im having trouble with is that the files have a date attached on the file name that changes daily.
For example:
FileName Day 1 FileName Day +1
bkrev_cb_05-13-01.xls bkrev_cb_05-14-01.xls
bkrev_inf_05-13-01.xls bkrev_inf_05-14-01.xls
What I'd like to be able to do is open the cb file (always from the same directory), call the formatting macro, and then save the formatted worksheet with the date at the end of the file name to a directory (always the same one) other than where I opened the file from. Then do the same process for the rest of my files.
I know that is a tall order, but any help would be appreciated.
Thanks
Steve