title: How to get a date range prompt using a SQL connection in Excel
body: <p>So I have created a connection in MS Query and am now using it in Excel. I want to create a macro button that when I click it the query automatically runs.</p>
  
  <p>However when it runs I want you to be allowed to select the input for some fields. For example the two date fields and the entry field here:</p>
  
  <pre><code>WHERE 
      (ENTERED_ON BETWEEN {ts '2020-02-01 00:00:00'} AND {ts '2020-02-14 00:00:00'}) 
      AND (ENTRY = 'apple')
  </code></pre>
  
  <p>Any help would be greatly appreciated. Also just to note the date and time has to be specifically in that format. I also want to keep the prompt as simple as possible for users so ideally with something like:</p>
  
  <pre><code>Dim sUserInput As String 
  sUserInput = InputBox("Enter Number:", "Collect User Input") 
  </code></pre>