ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Deleting a file, created by macro (https://www.excelbanter.com/excel-programming/302021-deleting-file-created-macro.html)

CLR[_2_]

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






Bob Phillips[_6_]

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








CLR[_2_]

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










Bob Phillips[_6_]

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