How do I create a self-deleted file after a certain date?

G

Guest

I want to set a file to be auto-deleted after a certain date? Is there any
function to do this?
 
P

Paul B

safin, only with VBA, but what happens if the user opens the workbook with
macros disabled? So I think the short answer is no

--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2000 & 2003
** remove news from my email address to reply by email **
 
S

ste mac

Hi stick this in the ' open workbook' code...

It should do what you want... the code is from an old post..
--------------------------------------------------
Private Sub Workbook_Open()
With ActiveWorkbook
If Date > DateValue("12-Nov-2004") Then
.Saved = True
.ChangeFileAccess xlReadOnly
Kill .FullName
.Close False
End If
End With

End Sub
 

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

Top