The code expires the file on the basis of a date specified in the macro![]()
Sub Auto_Open() Dim exdate As Date exdate = "27/06/2007" If Date > exdate Then MsgBox ("This file has expired") ActiveWorkbook.Close End If MsgBox ("You have " & exdate - Date & "Days left") End Sub
Can this code be modifoed in a manner which will expire the file after certain days on opening of a file say after seven days?
Alos posted at mrexcel but not getting any reply. Hope someone will help me here.
http://www.mrexcel.com/board2/viewtopic.php?t=279813
Bookmarks