title: Create a macro to filter between two dates vba
body: <p>I am trying to write a macro that will filer  between two dates but I don't know how to do it.All my dates are in column D.I'd tried to filter using this code but the filter doesn't work how it's supposed to work.</p>
  
  <pre><code>Sheets("All").ListObjects("Table_Name").Range.AutoFilter Field:=4, _
      Criteria1:=DTPicker1, Operator:=xlAnd, Criteria2:=txtEDate
      Sheets("All").Select
  </code></pre>