View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Chip Pearson[_2_] Chip Pearson[_2_] is offline
external usenet poster
 
Posts: 95
Default Macro to delete a workbook.

John,

You can use the Kill statement to permanently delete a file. For
example,

Kill "C:\Test\Book1.xls"

Note that Kill does not put the file in the Recycle Bin. To
delete a file to the Recycle Bin, see
www.cpearson.com/excel/recycle.htm .


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com

"John Baker" wrote in message
...
Hi:

I need to save some data in a special workbook, save the

workbook (with a new name), then
e mail the workbook and delete the saved workbook.

I can do all this except the last step.

I want to delete the saved workbook (which is not the one

containing the macro) with no
question or message to the end user.

Anyone know of a method?

Regards

John Baker