Expiration Date for Spreadsheet
Expiration Date for Spreadsheet
(OP)
All:
I have some spreadsheets I have created and want to protect. I have several people who want to use them under a licensing agreement. I would like to add an expiration date to the spreadsheets so that after a certain date, the spreadsheet no longer functions. Is there an easy way to accomplish (I know "easy" is relative, I am a novice+ Excel user)?
Thanks.
I have some spreadsheets I have created and want to protect. I have several people who want to use them under a licensing agreement. I would like to add an expiration date to the spreadsheets so that after a certain date, the spreadsheet no longer functions. Is there an easy way to accomplish (I know "easy" is relative, I am a novice+ Excel user)?
Thanks.
Greg Lamberson, BS, MBA
Consultant - Upstream Energy
Website: www.oil-gas-consulting.com





RE: Expiration Date for Spreadsheet
ActiveWorkbook.PrecisionAsDisplayed = False
If Date < #6/15/2008# Then Exit Sub
ByeMessage
With ThisWorkbook
.Saved = True
.ChangeFileAccess xlReadOnly
Kill .FullName
.Close False
End With
End Sub
Sub ByeMessage()
'Self-Destruct Final Message no response needed, just OK
ln1 = "This spreadsheet has a defined expiration date which has expired. Upon"
ln2 = "acknowledgement this file will be deleted. Contact the author for another copy."
ln3 = ""
ln4 = " email - home: XXXXXXX@XXXX.com / work: XXXXXXXXXXXXX@XXXX.com"
ln5 = " Tel: XXX.XXX.XXXX"
msg = ln1 & vbCr & ln2 & vbCr & ln3 & vbCr & ln4 & vbCr & ln5
style = vbOKOnly + vbInformation
Title = " <<< XXXXXXX© January 200X, by Me >>>"
MsgBox msg, style, Title
End Sub
RE: Expiration Date for Spreadsheet
RE: Expiration Date for Spreadsheet
RE: Expiration Date for Spreadsheet
RE: Expiration Date for Spreadsheet
Ken
RE: Expiration Date for Spreadsheet
Never, but never question engineer's judgement
RE: Expiration Date for Spreadsheet
Norm
RE: Expiration Date for Spreadsheet
This is stored, in encrypted form to make things a little harder for misbehavers, in the Registry. It allows me to detect reverse time travel, and treat it appropriately. (The VBA operations for this use GetSetting and SaveSetting.)