Deleting a file, created by macro

  • Thread starter Thread starter CLR
  • Start date Start date
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
 
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)
 
Junior Walker ... good stuff!

--

HTH

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top