title: 'No Cells' After applying autofilter: Excel VBA
body: <p>I am autofiltering a range of cells in which case there might be an instance where there are no cells that meet the criteria of the filter (there are no cells with 'Yes' in the column I am looking at). When this happens, my program returns the error 'No Cells.' How can I set up error handling so that my program proceeds despite this? I have tried <code>On Error Resume Next</code> after the autofilter line, but it will not reach that line because it is stuck on the filter line. </p>
  
  <pre><code>.Range(.Cells(1, 1), .Cells(counter, LstCol1)).AutoFilter Field:=z, Criteria1:="Yes"
      Set rngFilter_Yes = Intersect(.UsedRange, .UsedRange.Offset(1), _
      .Columns(2)).SpecialCells(xlCellTypeVisible)
      On Error Resume Next &lt;- doesn't reach this line :( 
  </code></pre>