title: Comparing Dates With User Input
body: <p>I have found a statement that compares two dates to see if one is greater than another:</p>
  
  <pre><code>If Format(Date, "m/d/yyyy") &gt; #1/1/2000# Then MsgBox "Okay"
  </code></pre>
  
  <p>That's basically saying if today is later than January 1st, 2000 then pop up a message box.</p>
  
  <p>This is fine if I am putting the date in the code (i.e., 1/1/2000), but I would like to get a date from the user during run-time and can't figure out how to incorporate that into the statement above.</p>
  
  <p>If I provide a TextBox for the user to enter a date, I have surrounded the text with the # symbol:</p>
  
  <pre><code>If MyDate &gt; "#" &amp; Text1.Text &amp; "#" then
  </code></pre>
  
  <p>That does not work.  I've tried converting the text to Double, Integer, and Long.  I have no idea how to use the enclosing # symbols with user input.</p>
  
  <p>Thanks in advance for your help.</p>