+ Reply to Thread
Results 1 to 3 of 3

Run-time error 1004

  1. #1
    Registered User
    Join Date
    02-17-2009
    Location
    Sweden
    MS-Off Ver
    Excel 2003
    Posts
    6

    Run-time error 1004

    I have a workbook with over 900 worksheets.

    The macro I have is looping all sheets looking for empty cells in a specific column, and when it founds an empty cell the value for one cell is copied to the empty cell.
    But in one worksheet it stops with the error:

    Run-time error '1004'
    Application-defined or object-defined error

    And the row in the macro is:
    Please Login or Register  to view this content.
    The only difference in this worksheet is that cell 5,15 have more characters, about 1000, in the sheet that throws the error. And if I remove all text in the cell no error is thrown.

    How can I solve this problem?
    Can I change my code so it skips all cells that throws an error so it continues running to the last sheet?
    Last edited by Phrone; 02-27-2009 at 10:10 AM.

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,437

    Re: Run-time error 1004

    You could try this

    Please Login or Register  to view this content.
    Cheers
    Andy
    www.andypope.info

  3. #3
    Registered User
    Join Date
    02-17-2009
    Location
    Sweden
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Run-time error 1004

    Thanks Andy.
    Now the macro is working perfectly.

+ 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