+ Reply to Thread
Results 1 to 2 of 2

Macro coming back with Run Time Error

  1. #1
    Registered User
    Join Date
    02-08-2012
    Location
    Stamford, Connecticut
    MS-Off Ver
    Excel 2003
    Posts
    9

    Macro coming back with Run Time Error

    Hi Guys,

    I'm getting a run time error when I run the Macro below. Fortunately, the Macro still works but it comes back with the error. Do you guys see any reasons why this is happening? The error is the following:

    "Run-time error '1004': The command could not be completed by using the range specified. Select a single cell within the range and try the command again."

    It's definitely something to do with the auto filter but I don't understand what it is...


    Please Login or Register  to view this content.
    Last edited by amasulli; 05-14-2012 at 10:32 AM.

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: Macro coming back with Run Time Error

    Hi amasulli,

    Put a breakpoint in your code and single step through it. Find the line that gives the error and hover your mouse over the variables on that line. I'd bet you have LR =0 or something like that which gives an invalid range. See http://www.cpearson.com/excel/Debug.htm for how to solve your own problem.
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

+ 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