retrieving "Records Found"

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

When using VBA to access the Autofilter method, is there a way to access the
# of Records found?
 
Not really (since there is no guarantee it will be in the status bar), but
it is easy to get

dim rng as Range
set rng = Activesheet.autofilter.Range.columns(1).Cells

set rng = rng.specialcells(xlvisible)

msgbox "Records found: " & rng.count - 1

you subtract 1, because rng would include the header row.
 
THANK YOU.

I knew there had to be a way to get the information I needed. I just needed
to submit the question the right way.

You guys are the best. Microsoft chose their MVP's very well
 
Back
Top