Results 1 to 3 of 3

No Records Found (autofilter)

Threaded View

  1. #1
    Registered User
    Join Date
    10-11-2012
    Location
    East Boothbay Maine
    MS-Off Ver
    Excel 2007
    Posts
    1

    No Records Found (autofilter)

    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
    Last edited by arlu1201; 10-12-2012 at 02:22 PM. Reason: Use code tags in future.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1