Some times you have to set expiry date for your excel workbook. which will restrict use of workbook after certain period of time.
Steps:
- Press "Alt+F11" to launch the Visual Basic Editor from Excel
- Right-click "ThisWorkbook" in the "Project Explorer" window. Select "View Code" from the list of available options
- copy below code
Private Sub Workbook_Open()
'If Sheets("sheet1").Range("a1").Value < Date Then ' you can set value on worksheet
If doe < Date Then 'You can define date as doe
MsgBox "This tool has expired, please contact Admin.", vbCritical, "Expired"
ActiveWorkbook.Close False
End If
End Sub
No comments:
Post a Comment