Deleting file while in use

  • Thread starter Thread starter Todd Huttenstine
  • Start date Start date
T

Todd Huttenstine

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
 
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top