Thanks Thanks:  0
Likes Likes:  0
Results 1 to 4 of 4

Thread: Autofilter

  1. #1
    New Member
    Join Date
    Feb 2002
    Location
    Netherlands
    Posts
    3
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Is there a code to turn Autofilter off
    I mean: "Selection.AutoFilter" turns it either on or off depending on the status.
    I need a code the always turns it off and not on.

  2. #2
    Board Regular
    Join Date
    Mar 2002
    Posts
    363
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Try this:

    Sub FilterOff()
    On Error Resume Next
    ActiveSheet.ShowAllData
    If Err.Description = "ShowAllData method of Worksheet class failed" Then
    Selection.AutoFilter
    endif
    End Sub


    _________________
    It's never too late to learn something new.

    Ricky

    [ This Message was edited by: Ricky Morris on 2002-04-17 10:04 ]

  3. #3
    Board Regular
    Join Date
    Apr 2002
    Location
    Cape Town,South Africa
    Posts
    234
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Hello buddy

    Did you try this already ?

    Sub FilterOff()
    On Error Resume Next
    ActiveSheet.ShowAll
    If Err.Description = "ShowAllData method of Worksheet class failed" Then
    Selection.AutoFilter
    End Sub




  4. #4
    Board Regular
    Join Date
    Jul 2003
    Location
    San Francisco
    Posts
    112
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Quote Originally Posted by gareth
    Hello buddy

    Did you try this already ?

    Sub FilterOff()
    On Error Resume Next
    ActiveSheet.ShowAll
    If Err.Description = "ShowAllData method of Worksheet class failed" Then
    Selection.AutoFilter
    End Sub



    Object Doesnt support this property or method Error..

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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