+ Reply to Thread
Results 1 to 5 of 5

How to Debug-Run Time error- 1004 Application-Defined or object defined error

  1. #1
    Registered User
    Join Date
    08-01-2013
    Location
    DallasTX
    MS-Off Ver
    Excel 2007
    Posts
    40

    How to Debug-Run Time error- 1004 Application-Defined or object defined error

    I have a macro with a series of the same commands.
    They all work except this one. I don't understand what is wrong. It just highlights the whole line.
    I've obviously change the data to look generic.

    At first I thought it was the &_ because that is a break in the line in VB. I deleted that and it still didn't work.

    Any ideas or suggestions?
    I have about 10 other lines like that and they work fine.

    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    08-02-2013
    Location
    Québec
    MS-Off Ver
    Excel 2003, 2007, 2013
    Posts
    1,414

    Re: How to Debug-Run Time error- 1004 Application-Defined or object defined error

    Just too many ,"" and ) to try to figure out the problem!

    Type your formula in a cell and then go in the immediate window (CTRL + G) and enter the following commande line :

    ? activecell.FormulaR1C1

    You'll get the formula.
    GC Excel

    If this post helps, then click the star icon (*) in the bottom left-hand corner of my post to Add reputation.

  3. #3
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,723

    Re: How to Debug-Run Time error- 1004 Application-Defined or object defined error

    Or
    Enter the formula in a cell
    Select the cell with the formula
    Developer - Record Macro - OK (for macro name)
    F2 - Enter
    Right click on the active Sheet Tab
    Select View Code
    You'll see the formula in the macro you just OK'd

    GC Excel's way is shorter though.

  4. #4
    Registered User
    Join Date
    08-01-2013
    Location
    DallasTX
    MS-Off Ver
    Excel 2007
    Posts
    40

    Re: How to Debug-Run Time error- 1004 Application-Defined or object defined error

    Thanks for your responses.

    This is actually a recorded macro.
    That's what is confusing me.
    I clicked record macro then created the formula and selected the entire column and copied the formula into that column.

    I even tried recording the formula and clicking fill down and I got the same error.

    I did a similar formula in columns before and after this one and they are fine.

  5. #5
    Registered User
    Join Date
    08-01-2013
    Location
    DallasTX
    MS-Off Ver
    Excel 2007
    Posts
    40

    Re: How to Debug-Run Time error- 1004 Application-Defined or object defined error

    I figured it out.
    There was a "IF(Left(" deleted after the "&_". once I put the "IF(LEFT(" back in it worked!

+ 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. Replies: 1
    Last Post: 03-12-2014, 12:42 PM
  2. [SOLVED] Run time error 1004 Application-Defined or Object-Defined Error - Placing data into next e
    By michelle 1 in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 01-27-2014, 12:57 PM
  3. [SOLVED] Error " Run-time error '1004': application defined or object defined error
    By lengwer in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-11-2013, 07:26 AM
  4. [SOLVED] Macro causes Run time error 1004 Application defined or object-defined error
    By Firefighter in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-12-2012, 04:09 AM
  5. [SOLVED] run-time error '1004' application-defined or object-defined error - Excel 2007
    By kaurka in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-06-2012, 02:46 AM

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