Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 59
Default retrieving "Records Found"

When using VBA to access the Autofilter method, is there a way to access the
# of Records found?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default retrieving "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.

--
Regards,
Tom Ogilvy




"asmenut" wrote in message
...
When using VBA to access the Autofilter method, is there a way to access

the
# of Records found?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 59
Default retrieving "Records Found"

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

"Tom Ogilvy" wrote:

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.

--
Regards,
Tom Ogilvy




"asmenut" wrote in message
...
When using VBA to access the Autofilter method, is there a way to access

the
# of Records found?




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I view..."no. of records found"... when I filter. David O. Excel Discussion (Misc queries) 3 September 14th 09 09:21 PM
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
Retrieving info from "child" to a "parent" document create button to unhide rows Excel Discussion (Misc queries) 0 January 21st 07 10:40 PM
Getting "compile error" "method or data member not found" on reinstall Bp Excel Programming 1 April 23rd 04 04:42 PM


All times are GMT +1. The time now is 02:20 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"