I currently have the following code in a user form:
Private Sub cmdLogin_Click()
Dim user As String
Dim password As String
user = Me.txtUserID.Value
password = Me.txtPassword.Value
If Date > DateValue("14-09-2023") Then
MsgBox "This Trial version has now expired and the Workbook will close."
ActiveWorkbook.Close SaveChanges:=False
Exit Sub
End If
If Date <= DateValue("14-09-2023") Then
MsgBox "This is a trial version and will expire on 14 September 2023."
End If
I want to change it so that the expiry date is 10 days from first opening the workbook. Anyone help?
Private Sub cmdLogin_Click()
Dim user As String
Dim password As String
user = Me.txtUserID.Value
password = Me.txtPassword.Value
If Date > DateValue("14-09-2023") Then
MsgBox "This Trial version has now expired and the Workbook will close."
ActiveWorkbook.Close SaveChanges:=False
Exit Sub
End If
If Date <= DateValue("14-09-2023") Then
MsgBox "This is a trial version and will expire on 14 September 2023."
End If
I want to change it so that the expiry date is 10 days from first opening the workbook. Anyone help?