sassriverrat
Well-known Member
- Joined
- Oct 4, 2018
- Messages
- 655
I have some coding below that provides a "license key" of sorts for the workbook. While writing it, I've messed something up (that's probably obvious) because each time I open the test workbook, it asks me for the license key. The "expirationdate" is a specified cell with an end date set 360 dates from the last inputted date. ideas here? It should only be asking for the license key when the date has expired...not everytime.
Code:
If ExpirationDate > Date Then
Application.Visible = True
ElseIf ExpirationDate < Date Then
Application.Visible = False
d = Application.InputBox("Your workbook license has expired. Please enter the registration key to renew your license.", namer)
If d = CStr(Worksheets("Developer").Range("B23").Value) Then
Sheets("Developer").Range("C20") = Date
MsgBox "Welcome Back " & s, vbOKOnly, namer
Application.Visible = True
End If
End If