Results 1 to 5 of 5
  1. #1
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    SHOW all data if column is filtered... (2000)

    Why not work:
    Private Sub UserForm_Activate()
    If Sheets("L0951").AutoFilterMode = True Then
    Sheets("L0951").ShowAllData
    End If
    End SubI want to show all if one ore more comun have a data filtered...

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: SHOW all data if column is filtered... (2000)

    What goes wrong? Do you get an error message? If so, what does it say?

    PS Why haven't you reacted to the replies to <post:=707,416>post 707,416</post:>, <post:=708,185>post 708,185</post:> and <post:=708,287>post 708,287</post:>?

  3. #3
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: SHOW all data if column is filtered... (2000)

    Solved with the scrpit above, but i think not is "elegant", idea?

    Application.ScreenUpdating = False
    On Error Resume Next
    Sheets("L0951").ShowAllData
    On Error GoTo 0
    Application.ScreenUpdating = True

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: SHOW all data if column is filtered... (2000)

    AutoFilterMode is true if the autofilter arrows are displayed. It doesn't indicate whether rows are filtered. You could use FilterMode instead:

    Private Sub UserForm_Activate()
    If Sheets("L0951").FilterMode = True Then
    Sheets("L0951").ShowAllData
    End If
    End Sub

  5. #5
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: SHOW all data if column is filtered... (2000)

    sure, good code!
    Tks.

Posting Permissions

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