Deleting a file, created by macro
Hi All............
I open my Main WorkBook, then run a macro to create a secondary file, copy some values to it, and save it to disk. Then, as the macro continues, it emails this secondary file to my Customer... This all works fine, thanks mainly to much help from you fine folks. Now to my current problem.......I want to name that file with intelligence, like WorkOrder1938, rather than some generic name that the customer will not recognize. I then want to DELETE that file from my hard drive before finishing up the macro. I need the code please to delete a file named WorkOrder1938.xls from my hard drive, if possible. TIA Vaya con Dios, Chuck, CABGx3 |
Deleting a file, created by macro
Assuming it is in "C:\myTest" then
Kill "C:\Mytest\WorkOrder1938.xls" -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "CLR" wrote in message ... Hi All............ I open my Main WorkBook, then run a macro to create a secondary file, copy some values to it, and save it to disk. Then, as the macro continues, it emails this secondary file to my Customer... This all works fine, thanks mainly to much help from you fine folks. Now to my current problem.......I want to name that file with intelligence, like WorkOrder1938, rather than some generic name that the customer will not recognize. I then want to DELETE that file from my hard drive before finishing up the macro. I need the code please to delete a file named WorkOrder1938.xls from my hard drive, if possible. TIA Vaya con Dios, Chuck, CABGx3 |
Deleting a file, created by macro
Hooooowwww sweet it is!!!.....thanks Bob
Vaya con Dios, Chuck, CABGx3 "Bob Phillips" wrote in message ... Assuming it is in "C:\myTest" then Kill "C:\Mytest\WorkOrder1938.xls" -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "CLR" wrote in message ... Hi All............ I open my Main WorkBook, then run a macro to create a secondary file, copy some values to it, and save it to disk. Then, as the macro continues, it emails this secondary file to my Customer... This all works fine, thanks mainly to much help from you fine folks. Now to my current problem.......I want to name that file with intelligence, like WorkOrder1938, rather than some generic name that the customer will not recognize. I then want to DELETE that file from my hard drive before finishing up the macro. I need the code please to delete a file named WorkOrder1938.xls from my hard drive, if possible. TIA Vaya con Dios, Chuck, CABGx3 |
Deleting a file, created by macro
Junior Walker ... good stuff!
-- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "CLR" wrote in message ... Hooooowwww sweet it is!!!.....thanks Bob Vaya con Dios, Chuck, CABGx3 "Bob Phillips" wrote in message ... Assuming it is in "C:\myTest" then Kill "C:\Mytest\WorkOrder1938.xls" -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "CLR" wrote in message ... Hi All............ I open my Main WorkBook, then run a macro to create a secondary file, copy some values to it, and save it to disk. Then, as the macro continues, it emails this secondary file to my Customer... This all works fine, thanks mainly to much help from you fine folks. Now to my current problem.......I want to name that file with intelligence, like WorkOrder1938, rather than some generic name that the customer will not recognize. I then want to DELETE that file from my hard drive before finishing up the macro. I need the code please to delete a file named WorkOrder1938.xls from my hard drive, if possible. TIA Vaya con Dios, Chuck, CABGx3 |
All times are GMT +1. The time now is 01:24 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com