Deleting a file, created by macro

C

CLR

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
 
B

Bob Phillips

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)
 
B

Bob Phillips

Junior Walker ... good stuff!

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
Top