I have a macro which filters a record set with a criteria. Sometimes there will be filtered records other times not. I would like to do an If Then Else based on the filter displaying or not displaying rows. What follows is my failed attempt.
**Code Snippet
ActiveSheet.ListObjects("Table_Query_from_SOTAMAS9010").Range.AutoFilter Field _
:=5, Criteria1:="HODINT", Operator:=xlAnd
Application.Goto Reference:="Table_Query_from_SOTAMAS9010"
If Selection.SpecialCells(xlCellTypeVisible).Rows.Count >=1 Then <---This is not working
'Do first action
Else
'Do second action
End If
****End of Code
Appreciate any help,
Brian
Bookmarks