+ Reply to Thread
Results 1 to 4 of 4

Paste Method of Worksheet Class Failed for simple macro

  1. #1
    Registered User
    Join Date
    05-20-2016
    Location
    Ottawa, Canada
    MS-Off Ver
    Office 365
    Posts
    2

    Paste Method of Worksheet Class Failed for simple macro

    Hello, I'm attempting to record a macro for a simple sorting of data, to compile it in one column among a few other steps. I have determined by trial and error that it is the compiling to one column step that is giving me an error while my sorting and other functions are working alright. Here is the step that is giving me an error:

    (I've provided red text for where the debugger is suggesting, and I've also tried "PasteSpecial" on that line to no success)
    Please Login or Register  to view this content.
    Not an expert at all, so I'm not sure what can be learned from the above. I'm trying to paste all from the three other columns into one column. The data appears to be there despite the error message coming up.

    Thanks for your help!
    Last edited by 6StringJazzer; 05-20-2016 at 11:55 AM. Reason: code tags

  2. #2
    Forum Expert
    Join Date
    02-14-2009
    Location
    .
    MS-Off Ver
    ................
    Posts
    2,840

    Re: Paste Method of Worksheet Class Failed for simple macro

    By the time the code gets to the Paste, there's nothing to paste!

    The line
    Please Login or Register  to view this content.
    clears the Clipboard.

    And you will have to do each Copy/Paste in order. You can't copy a number of ranges and then paste - you will only paste the last copied range.
    Last edited by cytop; 05-20-2016 at 11:33 AM.

  3. #3
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Paste Method of Worksheet Class Failed for simple macro

    Moderator's note: Please take the time to review our rules. There aren't many, and they are all important. Rule #3 requires code tags. I have added them for you this time because you are a new member. --6StringJazzer
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  4. #4
    Registered User
    Join Date
    05-20-2016
    Location
    Ottawa, Canada
    MS-Off Ver
    Office 365
    Posts
    2

    Re: Paste Method of Worksheet Class Failed for simple macro

    Quote Originally Posted by cytop View Post
    By the time the code gets to the Paste, there's nothing to paste!

    The line
    Please Login or Register  to view this content.
    clears the Clipboard.

    And you will have to do each Copy/Paste in order. You can't copy a number of ranges and then paste - you will only paste the last copied range.
    Ah, I see. I was using the clipboard "Paste All" and "Clear All" functions, which I guess the macro can't record or use. I'll try a simpler way, by using relative selections.

    Quote Originally Posted by 6StringJazzer View Post
    Moderator's note: Please take the time to review our rules. There aren't many, and they are all important. Rule #3 requires code tags. I have added them for you this time because you are a new member. --6StringJazzer
    Sorry and thank you

+ 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: 10
    Last Post: 01-28-2014, 02:05 PM
  2. Help with Macro : runtime error 1004 paste method of worksheet class failed
    By aka189 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-26-2012, 05:32 PM
  3. Paste Method of Worksheet Class Failed
    By jacobadger in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-18-2012, 10:41 AM
  4. Help with a Macro-Paste method of worksheet class failed run time error 1004
    By mcneill_garr in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-10-2011, 03:10 PM
  5. Paste Method of Worksheet Class Failed
    By rhudgins in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-27-2011, 03:57 PM
  6. [SOLVED] Paste method of worksheet class failed
    By Maxi in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-08-2006, 12:35 PM
  7. [SOLVED] paste method of worksheet class failed
    By Dwaine Horton in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-11-2005, 03:05 PM
  8. Paste method of worksheet class failed
    By kavisara in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-02-2005, 01:44 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