Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,355
Default Deleting Workbook

What would be the code to delete a workbook located here

C:\temp\Workbook.xls

Thanks,
Barb Reinhardt
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default 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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,624
Default 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

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,624
Default Deleting Workbook

needs quotes around the argument.

In article ,
Gary Brown wrote:

Kill C:\temp\Workbook.xls



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default 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


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
deleting workbook saqib New Users to Excel 1 June 24th 08 03:22 PM
Deleting Workbook from others Julia Excel Worksheet Functions 2 April 22nd 08 06:34 PM
Deleting workbook SidBord Excel Programming 0 July 14th 04 07:52 PM
Deleting workbook Tom Ogilvy Excel Programming 0 July 14th 04 03:50 PM
Deleting Workbook Fred[_16_] Excel Programming 2 November 26th 03 06:33 PM


All times are GMT +1. The time now is 11:45 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"