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

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I want to set a file to be auto-deleted after a certain date? Is there any
function to do this?
 
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 **
 
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
 
Back
Top