Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Zero records in Filter

use something like this:

Dim rg As Excel.Range
Range("A1").AutoFilter Field:=1, Criteria1:="axa"
Set rg = Application.Intersect(Range("A:A"), Range
("A1").CurrentRegion).SpecialCells(xlCellTypeVisib le)
MsgBox rg.Count - 1 & " records found"


Francisco Mariscal


-----Original Message-----
Hi all

How can I find out if AutoFilter returned 0 records using
VBA, I just want to say If zero records found msgBox else
my remaining code

TIA

Soniya
.

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
VBA Filter out unwanted records James C[_2_] Excel Discussion (Misc queries) 4 January 26th 10 05:15 PM
Number of records after filter Jon Dow[_2_] Excel Worksheet Functions 2 October 1st 08 07:25 AM
Filter Unique Records Dee Excel Discussion (Misc queries) 1 June 23rd 06 09:22 PM
How can I always get subtotals (4 of 12 records)when I filter a sh Frank P. Excel Discussion (Misc queries) 1 January 25th 06 02:53 AM
Why does it say "Filter mode" instead of "X of Y records"? lucky_jed Excel Worksheet Functions 3 April 7th 05 12:05 PM


All times are GMT +1. The time now is 01:10 AM.

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

About Us

"It's about Microsoft Excel"