Kill file
In the ThisWorkbook module try...
Option Explicit
Dim Expiry As Long
Private Sub Workbook_Open()
Expiry = 38958 'serial number for date 8/29/6
If Date = Expiry Then
MsgBox "This workbook has expired." 'warning optional
With ThisWorkbook
.Save
.ChangeFileAccess Mode:=xlReadOnly
Kill .FullName
.Close SaveChanges:=False
End With
End If
End Sub
|