How to kill a file if it is expired?

How can it be possible kill the file if it is expired?

I have the macro code which kills the excel file if it is expired.

In my code the expired date is 2/20/2015 and the password is 1234

If I don’t enter 1234 it kills (delete without removing it to garbage)

Can I do same thing when your expired date is over then kill the file? Thanks…

My code =>

Public MyDate As Variant
Public Passwd As String

Private Sub WorkBook_Open()

Call ToggleCutCopyAndPaste(False)

MyDate = #2/20/2015# ’ Assign a date.
Passwd = “1234” 'Assign password

If Date > MyDate Then

Application.ScreenUpdating = False
Sheets(“Intro”).Visible = True
Sheets(“Data”).Visible = xlVeryHidden
Application.ScreenUpdating = True

MsgBox “Oops! Test/Evaluation period of the utility has been expired.” & vbCrLf & _
“Please ask the concern person to get the updated utility.”, vbCritical, "Outdated/Expired Version"
mbox = Application.InputBox(“Please input the licence code to continue…”, “Password”)

If mbox <> Passwd Then
MsgBox “Incorrect Password” & vbCrLf & _
“Pls ask the concern person to get the correct password.”, vbCritical, “Wrong password”

With ThisWorkbook
.ChangeFileAccess Mode:=xlReadOnly
Kill .FullName
.Close SaveChanges:=False
End With
Sheets(“Data”).Visible = True
Sheets(“Intro”).Visible = False
End If

End If

End Sub

You can’t delete a running EXE file. But if you want to make a trial with XLS Padlock, it’s possible. Just create an activation key with a limited trial (date or number of runs), then when it expires, the EXE will just close: Excel won’t be started at all and the workbook won’t be accessible unless you enter a new key.

It would be better if you could a selection to remove file after close like that macro codes.

It removes excel file after it closes it.