alstubna
03-15-2008, 11:15 PM
Hello !
I have a macro that imports data from a text file (*.txt).
The name of this text file is in cell A1:
Parts List 2008 - Vol 1.txt
After the data is imported it's sliced, diced, moved around and whatnot.
As the last action of the macro I would like it to rename the text file to a name I have in cell B1 that's put together by a formula:
=LEFT(A1,LEN(A1)-4)&"(P).txt"
Results in the new desired name:
Parts List 2008 - Vol 1(P).txt
Renaming the file lets me know that that particular data has been processed.
Currently, after I'm done with the spreadsheet file I close Excel and go into Windows Explorer to rename the text file manually. If I could automate this is would be the icing on the cake.
Thanks for any assistance you can offer.
Al Stubna
I have a macro that imports data from a text file (*.txt).
The name of this text file is in cell A1:
Parts List 2008 - Vol 1.txt
After the data is imported it's sliced, diced, moved around and whatnot.
As the last action of the macro I would like it to rename the text file to a name I have in cell B1 that's put together by a formula:
=LEFT(A1,LEN(A1)-4)&"(P).txt"
Results in the new desired name:
Parts List 2008 - Vol 1(P).txt
Renaming the file lets me know that that particular data has been processed.
Currently, after I'm done with the spreadsheet file I close Excel and go into Windows Explorer to rename the text file manually. If I could automate this is would be the icing on the cake.
Thanks for any assistance you can offer.
Al Stubna