+ Reply to Thread
Results 1 to 10 of 10

Run-time error '1004' PasteSpecial

  1. #1
    Registered User
    Join Date
    05-26-2010
    Location
    Philadelphia, PA
    MS-Off Ver
    Excel 2007
    Posts
    15

    Exclamation Run-time error '1004' PasteSpecial

    The code below is being used in a spreadsheet by one of my users. I have marked the line that errors with '###.' It is intended to fill in cells on a sheet that is not filtered and does not have hidden columns. The address just before the failed line is $AH$2. AH2 is a blank cell, information should be being placed at AH3. I have no VB capabilities, but I told my user I would reach out to some VB forums for some help. If someone could help me out, you would be my hero. If there is information that is needed to debug the code, just let me know and I will get it.

    Please Login or Register  to view this content.

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Run-time error '1004' PasteSpecial

    Does the workbook have merged cells?
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    05-26-2010
    Location
    Philadelphia, PA
    MS-Off Ver
    Excel 2007
    Posts
    15

    Re: Run-time error '1004' PasteSpecial

    Negative, no merged cells in the entire workbook.

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Run-time error '1004' PasteSpecial

    Is the sheet unprotected?

    Post a scrubbed copy of the workbook that demonstrates the problem?

  5. #5
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,998

    Re: Run-time error '1004' PasteSpecial

    I think your row insert is clearing the clipboard. Try this:
    Please Login or Register  to view this content.
    PS Is it really supposed to be Row - 1, rather than Row + 1 in the code to get the destination rows?
    Everyone who confuses correlation and causation ends up dead.

  6. #6
    Registered User
    Join Date
    05-26-2010
    Location
    Philadelphia, PA
    MS-Off Ver
    Excel 2007
    Posts
    15

    Re: Run-time error '1004' PasteSpecial

    @romperstomper

    When I use your code, I got a different 1004 run time error, but I followed up on your postscript and changed the row - 1 to row +1 and the error is no longer generated. Some of my results are not appearing as intended, so I am in communication with my user to find out if I can privately host the workbook for examination.

  7. #7
    Registered User
    Join Date
    05-26-2010
    Location
    Philadelphia, PA
    MS-Off Ver
    Excel 2007
    Posts
    15

    Re: Run-time error '1004' PasteSpecial

    http://dl.dropbox.com/u/6124430/past...alworkbook.rar

    This is the file in question. It is not proprietary information, so I can host it.

    If you look @ the CMCSA Spread worksheet, you will see that columns B and C are percents, and column D is the sum of b+c. Everything is great until we reach row 1563 where column B is suddenly a date and thus, the yield in column D is skewed.

    Additionally, you will note that every four rows is a boldfaced "...as of [date]" but at row 1565 the dates no longer increase logically.

    I greatly appreciate you folks taking the time to examine this issue. Sadly, my location is under the impression that I can do VB coding, despite having made no indications of possessing that capability.

  8. #8
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Run-time error '1004' PasteSpecial

    Please post the file in this forum, either uncompressed or zipped.

  9. #9
    Registered User
    Join Date
    05-26-2010
    Location
    Philadelphia, PA
    MS-Off Ver
    Excel 2007
    Posts
    15

    Re: Run-time error '1004' PasteSpecial

    My apologies, hadn't gone advanced for a reply so I didn't know I could attach! It is attached in this post, zipped.
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    05-26-2010
    Location
    Philadelphia, PA
    MS-Off Ver
    Excel 2007
    Posts
    15

    Re: Run-time error '1004' PasteSpecial

    Bump. Any further assistance?

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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