Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Delete workbook

I have a macro which has copied data from a workbook, I now want the macro
to delete the entire workbook (send it to the recycle bin) but can't figure
out how to do it. Can someone please help me with this problem.


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,049
Default Delete workbook

KILL "path"

"Ed" wrote in message
...
I have a macro which has copied data from a workbook, I now want the macro
to delete the entire workbook (send it to the recycle bin) but can't
figure out how to do it. Can someone please help me with this problem.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Delete workbook

Thanks Patrick, it works great.


"Patrick Molloy" wrote in message
...
KILL "path"

"Ed" wrote in message
...
I have a macro which has copied data from a workbook, I now want the
macro to delete the entire workbook (send it to the recycle bin) but
can't figure out how to do it. Can someone please help me with this
problem.



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default Delete workbook

Just so the OP knows, Kill doesn't send the file to the Recycle Bin (as the
OP indicated he wanted)... it permanently removes the file from the drive.

--
Rick (MVP - Excel)


"Patrick Molloy" wrote in message
...
KILL "path"

"Ed" wrote in message
...
I have a macro which has copied data from a workbook, I now want the
macro to delete the entire workbook (send it to the recycle bin) but
can't figure out how to do it. Can someone please help me with this
problem.


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default Delete workbook

If the OP wants to use the Recycle Bin, there is an API solution to do so.
There is an example of how to do this here...

http://vbnet.mvps.org/code/shell/recyclebin.htm

If the OP needs help breaking this apart for his own needs, he should post
back to this thread and someone here will assist him.

--
Rick (MVP - Excel)


"Rick Rothstein" wrote in message
...
Just so the OP knows, Kill doesn't send the file to the Recycle Bin (as
the OP indicated he wanted)... it permanently removes the file from the
drive.

--
Rick (MVP - Excel)


"Patrick Molloy" wrote in message
...
KILL "path"

"Ed" wrote in message
...
I have a macro which has copied data from a workbook, I now want the
macro to delete the entire workbook (send it to the recycle bin) but
can't figure out how to do it. Can someone please help me with this
problem.





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Delete workbook

Thanks Guys - I don't really care what happens to the file. Appreciate all
your help - working fine.


"Rick Rothstein" wrote in message
...
If the OP wants to use the Recycle Bin, there is an API solution to do so.
There is an example of how to do this here...

http://vbnet.mvps.org/code/shell/recyclebin.htm

If the OP needs help breaking this apart for his own needs, he should post
back to this thread and someone here will assist him.

--
Rick (MVP - Excel)


"Rick Rothstein" wrote in message
...
Just so the OP knows, Kill doesn't send the file to the Recycle Bin (as
the OP indicated he wanted)... it permanently removes the file from the
drive.

--
Rick (MVP - Excel)


"Patrick Molloy" wrote in message
...
KILL "path"

"Ed" wrote in message
...
I have a macro which has copied data from a workbook, I now want the
macro to delete the entire workbook (send it to the recycle bin) but
can't figure out how to do it. Can someone please help me with this
problem.





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
Save workbook and delete old workbook fee Excel Programming 3 March 12th 08 02:13 PM
delete workbook from one location and save workbook to new locatio Damien Excel Programming 5 August 3rd 06 03:05 PM
How to Delete a Range in Closed Workbook (to Replace Delete Query) [email protected] Excel Discussion (Misc queries) 1 March 8th 06 10:10 AM
Delete row if value in another workbook d4m Excel Programming 2 December 20th 05 04:36 PM
Automatically Delete WorkBook 2 modules by using Workbook 1 module ddiicc Excel Programming 5 July 27th 05 12:53 PM


All times are GMT +1. The time now is 08:32 AM.

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"