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 . |
All times are GMT +1. The time now is 08:40 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com