title: Compare Dates in VBA
body: <p>I have two textboxes with two differents dates, orderDate and recievedDate. The recieved date needs to be entered manually into the form and I want to include the validation that the recievedData should happen after the orderDate, I have tried:</p>
  
  <pre><code>If txtRecievedDate.Text &lt; txtOrderDate.Text Then
  
     MsgBox "Incorrect Date, item can't be recieved before order"
  
  else    
  
    MsgBox "correct date"
  
  End If
  </code></pre>
  
  <p>This doesn't work as for example RecievedDate value is "19/11/2013" and OrderDate value is "20/10/2013" although this would be a correct date this statement only compares the "19" and "20" therefore marking it as incorrect. </p>
  
  <p>Is there a way of comparing two dates within textboxes? For this im using VBA</p>
  
  <p>Thanks </p>