+ Reply to Thread
Results 1 to 4 of 4

AutoFilter method of Range class failed - Yet autofilter works.

  1. #1
    Registered User
    Join Date
    05-12-2009
    Location
    Udevalla, Sweden
    MS-Off Ver
    Excel 2007
    Posts
    85

    AutoFilter method of Range class failed - Yet autofilter works.

    Hi.

    Im sure this is a very common problem.
    I tried searching for it but I havent found anything that solves this for me.

    Here is the code Im using:

    Please Login or Register  to view this content.

    I have a listbox with some values in it which is linked to the cell M3.
    The idea is to AutoFilter with the value selected in the listbox as Criteria1.

    The AutoFilter does actually work. The list is filtered with the value selected but I still get the "AutoFilter method of Range class failed" error message.

    Any ideas?
    Last edited by Carlsbergen; 09-25-2009 at 09:16 AM.

  2. #2
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,330

    Re: AutoFilter method of Range class failed - Yet autofilter works.

    try changing this line
    Please Login or Register  to view this content.
    If the solution helped please donate to RSPCA

    Site worth visiting: Rabbitohs

  3. #3
    Registered User
    Join Date
    05-12-2009
    Location
    Udevalla, Sweden
    MS-Off Ver
    Excel 2007
    Posts
    85

    Re: AutoFilter method of Range class failed - Yet autofilter works.

    Typical.. Just minutes after posting I find a solution
    Sorry to have wasted your time pike.
    I was just going to set the thread as SOLVED when I saw your post.

    Anyway, the problem seems to have been that I was trying to autofilter the same list that populated the ListBox.
    I changed it now so that the autofiltered list is in its own worksheet and now my original code works just fine.


    Thanks anyway pike!!

  4. #4
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,330

    Re: AutoFilter method of Range class failed - Yet autofilter works.

    Thanks for sharing and marking the post

+ 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