title: form control click not responding
body: <p>I am using a checkbox form control that I want to execute the code below based on a true or false status. If true (checked) then filter the dates, if false (not checked) then remove the filter. I don't know what is wrong but it is not executing the filter commands.</p>
  <pre><code>Sub CheckBox5_Click()
  Dim StDate As Long
  Dim EndDate As Long
  StDate = ActiveSheet.Range(&quot;T2&quot;)
  EndDate = ActiveSheet.Range(&quot;T1&quot;)
  
  If ActiveSheet.Shapes(&quot;Check Box 5&quot;).ControlFormat.Value = True Then Range(&quot;b37:r10000&quot;).AutoFilter 
  2, &quot;&gt;=&quot; &amp; StDate, xlAnd, &quot;&lt;=&quot; &amp; EndDate
  If ActiveSheet.Shapes(&quot;Check Box 5&quot;).ControlFormat.Value = False Then ActiveSheet.Range(&quot;B36:r10000&quot;).AutoFilter Field:=2 'Range(&quot;$b$37:$r$10000&quot;).AutoFilter 2
  End Sub
  </code></pre>