Results 1 to 4 of 4

AutoFilter method of Range class failed - Yet autofilter works.

Threaded View

  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:

    Sub InterfaceAutoFilterProspectID()
    ' Engages AutoFilter with cell M3 in -ForMacros2- as Criteria1
    
        Sheets("-ForMacros2-").Select
    
    Dim cRit As String
        cRit = Sheets("-ForMacros2-").Range("M3").Value
    
        Selection.AutoFilter Field:=3, Criteria1:=cRit
    End Sub

    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.

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