Hi All,
I have a form on excel which is being used on a trial basis. Once the trial is up a message box appears to inform the user their trial has expired. If the expiry date in the code is 31/08/17 it should expire as today's date is 15/09/17...which it does. But I've realized if I manually change the date on my computer to say 29/08/17 then the code doesn't recognize today's actual date, it will only recognize the date I have set my computer to. Is there a way to prevent this? I don't want users being able to access this form after their trial has expired. The code I'm currently using is:
I have a form on excel which is being used on a trial basis. Once the trial is up a message box appears to inform the user their trial has expired. If the expiry date in the code is 31/08/17 it should expire as today's date is 15/09/17...which it does. But I've realized if I manually change the date on my computer to say 29/08/17 then the code doesn't recognize today's actual date, it will only recognize the date I have set my computer to. Is there a way to prevent this? I don't want users being able to access this form after their trial has expired. The code I'm currently using is:
Code:
'Dim Edate As DateEdate = Format("30/09/2017", "DD/MM/YYYY")
If Date > Edate Then
MsgBox ("CURMIS Investment Register template was valid up to " & Format(Edate, "dd-mmm-yyyy") & " and will close.") & vbNewLine & " " & vbNewLine & "Please Contact Michael O'Grady & Co. for further use of this tool."
ActiveWorkbook.Close savechanges:=False'