title: Excel VBA - Check whether a filtered table returns any results
body: <p>I have a macro that filters a table (in the code as a ListObject) and then copies the visible cells in the DataBodyRange to a seperate table. The code works fine unless the filtering action removes all the data (i.e. the table only has the header row and nothing else).</p>
  
  <p>Is there a neat way to check whether any rows are visible? I'd like to avoid <code>on error resume</code> terms if possible, I'm struggling to think of any other way though?</p>
  
  <p>I've included some pseudocode below to illustrate what I mean, any assistance would be much appreciated!</p>
  
  <p>Adam</p>
  
  <pre><code>If TargetTable.DataBodyRange.VisibleRows.Count &gt; 0 Then
      TargetTable.DataBodyRange.SpecialCells(xlCellTypeVisible).Copy Destination:=OutputPasteRange
  End If
  </code></pre>