title: Check if The system Date is correct in Vba
body: <p>Does anyone can help? How to check if a local system has a valid date setting using vba. To protect Code from being run after specified date.</p>
  
  <p>The following code is not enough, it can be break by changing system date.</p>
  
  <pre><code>Private Sub Workbook_Open()
  If Date &gt; DateSerial(2018, 5, 17) Then
  ThisWorkbook.Close SaveChanges:=False
  End If
  End Sub
  </code></pre>
  
  <p>Thanks for any reply</p>