+ Reply to Thread
Results 1 to 2 of 2

Keep getting errors on a macro

  1. #1
    Forum Contributor
    Join Date
    08-02-2005
    Location
    LONDON
    MS-Off Ver
    OFFICE365
    Posts
    140

    Keep getting errors on a macro

    I have a macro that I keep getting a error on. Can anyone help.

    The macro shown below.

    Please Login or Register  to view this content.
    Ive put into my workbook and comes up with run time error 1004 auto method of range class failed.

    Can anyone help. Im using office XP if that helps.

    Thanks
    Last edited by mudraker; 09-02-2007 at 05:21 PM.

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hello Tweacle,

    It really isn't clear from your post what you are attempting to filter. The AutoFilter method operates on a single column within the range to be filtered. This is what the argument Field1 points to. The left most field in the range is one. you also include an Array in Criteria1. You can create compound comparisons, but only with two values. To do this requires using Criteria1 and Criteria2 with the appropriate Operator. Here is sample that will filter the cells on Sheet1 in the range "A1:A20". If it finds either the number 12 or 95, those cells are cleared.
    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

+ 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