+ Reply to Thread
Results 1 to 4 of 4

Error: Autofilter method failed even though it didn't fail

  1. #1
    Registered User
    Join Date
    04-25-2012
    Location
    Phoenix, AZ
    MS-Off Ver
    Excel 2010
    Posts
    19

    Error: Autofilter method failed even though it didn't fail

    on combobox change, filter a table based on combox:

    Please Login or Register  to view this content.
    it filters my table correctly, but then it gives me a 'runtime error 1004 autofilter method of range failed'

  2. #2
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,887

    Re: Error: Autofilter method failed even though it didn't fail

    Hi Matt, welcome to the forum.

    Can you upload a sample copy of your workbook rather than us trying to build one that won't likely match yours? Replace any confidential data with fake data, of course.

    Thanks.

  3. #3
    Registered User
    Join Date
    04-25-2012
    Location
    Phoenix, AZ
    MS-Off Ver
    Excel 2010
    Posts
    19

    Re: Error: Autofilter method failed even though it didn't fail

    Filter Help.xlsm

    example workbook

  4. #4
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,887

    Re: Error: Autofilter method failed even though it didn't fail

    Hi Matt,

    Try this updated code (thanks to Mikerickson here: http://www.ozgrid.com/forum/showthre...162#post572162)
    Please Login or Register  to view this content.
    I honestly don't know why it works, but it does. (Even weirder - the code still gets triggered twice, the second time 'abort' is True (it never even got to the "abort = False" line) so it proceeds to Exit Sub, however it doesn't - it just skips the filtering line and then goes to the next line setting 'abort' to False before exiting the Sub.) ::shrug::

+ Reply to Thread

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