ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Deleting Workbook (https://www.excelbanter.com/excel-programming/391523-deleting-workbook.html)

Barb Reinhardt

Deleting Workbook
 
What would be the code to delete a workbook located here

C:\temp\Workbook.xls

Thanks,
Barb Reinhardt

Tom Ogilvy

Deleting Workbook
 
make sure the workbook is closed

Kill "C:\temp\Workbook.xls"

--
regards,
Tom Ogilvy



"Barb Reinhardt" wrote:

What would be the code to delete a workbook located here

C:\temp\Workbook.xls

Thanks,
Barb Reinhardt


JE McGimpsey

Deleting Workbook
 


kill "C:\temp\Workbook.xls"

In article ,
Barb Reinhardt wrote:

What would be the code to delete a workbook located here

C:\temp\Workbook.xls

Thanks,
Barb Reinhardt


Gary Brown

Deleting Workbook
 
Kill C:\temp\Workbook.xls
--
HTH,
Gary Brown

If this post was helpful to you, please select ''YES'' at the bottom of the
post.



"Barb Reinhardt" wrote:

What would be the code to delete a workbook located here

C:\temp\Workbook.xls

Thanks,
Barb Reinhardt


JE McGimpsey

Deleting Workbook
 
needs quotes around the argument.

In article ,
Gary Brown wrote:

Kill C:\temp\Workbook.xls


Chip Pearson

Deleting Workbook
 
Barb,

You can use the Kill method to permanently and completely delete the file:

Kill "C:\Temp\Workbook.xls"

Note that Kill does NOT send the file to the Recycle Bin. The file is gone
forever. If you want to recycle the file, see
http://www.cpearson.com/excel/recycle.htm .


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting LLC
www.cpearson.com
(email on the web site)


"Barb Reinhardt" wrote in message
...
What would be the code to delete a workbook located here

C:\temp\Workbook.xls

Thanks,
Barb Reinhardt




All times are GMT +1. The time now is 03:38 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com