Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 260
Default Deleting file while in use

Hey guys

The Excel file I am trying to delete is the same file that
the code is in.
I know it is impossible to delete or overwrite an Excel
file that is in use by Excel. But is there anyway that
after Excel quits, it can delete itself?


Thanx
Todd Huttenstine
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Deleting file while in use

Look at the
ChangeFileAccess
method. Have your code change it to readonly , then try to delete it.

I haven't tested it, but it might work.

--
Regards,
Tom Ogilvy

"Todd Huttenstine" wrote in message
...
Hey guys

The Excel file I am trying to delete is the same file that
the code is in.
I know it is impossible to delete or overwrite an Excel
file that is in use by Excel. But is there anyway that
after Excel quits, it can delete itself?


Thanx
Todd Huttenstine



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 a file Jo[_3_] Excel Discussion (Misc queries) 1 March 29th 09 02:50 AM
deleting a file Abhishek kedia Excel Discussion (Misc queries) 1 April 22nd 06 02:49 PM
Deleting a file from within Excel Night Owl Excel Worksheet Functions 3 May 14th 05 04:10 PM
Deleting a file on C drive using VBA Todd Huttenstine[_2_] Excel Programming 7 November 19th 03 03:26 AM
Deleting a file using VB Rohit Thomas Excel Programming 3 July 14th 03 09:11 PM


All times are GMT +1. The time now is 10:08 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"