+ Reply to Thread
Results 1 to 2 of 2

VBA | Advanced Filter | Run time error 1004 method range of object worksheet failed

  1. #1
    Registered User
    Join Date
    03-21-2013
    Location
    Columbia, SC
    MS-Off Ver
    Excel 2007
    Posts
    1

    VBA | Advanced Filter | Run time error 1004 method range of object worksheet failed

    I have modified code from a workbook developed by Contextures. I am getting a run time error on the following code:
    Please Login or Register  to view this content.
    The line in red is where the error is occurring. Error number 1004: Method range of object _worksheet failed. I have attached a modified version of my workbook. I think that I have referenced something incorrectly, but I am not sure where to fix it.

    Any help is greatly appreciated.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    12-10-2006
    Location
    Sydney
    MS-Off Ver
    Office 365
    Posts
    3,523

    Re: VBA | Advanced Filter | Run time error 1004 method range of object worksheet failed

    Hi williakm1013,

    Welcome to the forum!!

    The name range has actually been called CritieraRng when it was created whereas the code is referring to a named ranged range called CriteriaRng (note the additional 'i'). The two have to be exactly the same, so either renamed the named range or change the code.

    Regards,

    Robert
    ____________________________________________
    Please ensure you mark your thread as Solved once it is. Click here to see how
    If this post helps, please don't forget to say thanks by clicking the star icon in the bottom left-hand corner of my post

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Error 1004 - Method Range of Object Worksheet Failed
    By mrbickelsworth in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-24-2013, 02:18 PM
  2. Run time Error 1004 Method 'Range' object '_Worksheet 'failed
    By Monica1 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-24-2013, 07:42 AM
  3. Run Time error 1004 Method Select of Object Worksheet failed
    By AlexMach in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-14-2012, 03:07 AM
  4. Run-time error '1004': Method 'Range' of object '_Global' failed
    By claremount in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 03-26-2010, 08:01 AM
  5. Run time error 1004 - Method 'Range' of 'Object'_Global' failed
    By excelaspire0219 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 02-10-2009, 01:18 PM

Tags for this Thread

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