Results 1 to 4 of 4

Paste Method Failure when copying between worksheets

Threaded View

stubbsj Paste Method Failure when... 07-28-2012, 02:57 PM
fredlo2010 Re: Paste Method Failure when... 07-28-2012, 05:20 PM
Norie Re: Paste Method Failure when... 07-28-2012, 10:27 PM
stubbsj Re: Paste Method Failure when... 07-29-2012, 09:17 AM
  1. #1
    Forum Contributor
    Join Date
    10-07-2011
    Location
    Plano, TX USA
    MS-Off Ver
    Excel 2013
    Posts
    141

    Paste Method Failure when copying between worksheets

    Hi Everyone

    I am trying to copy a row from one table to another on 2 seperate worksheets.

    First I copy the row then create a new row in the second table. All of that works fine. However, when I actually try to paste in the new location, I get a "Paste Method of Worksheet Class Failed message" when I try to run the following code:

    Sub Archive_Row()
        ' copy current row
        ActiveCell.EntireRow.Select
        Selection.Copy
        'select archive worksheet
        Sheets("Archive").Select
        ' select last cell in table
        Range("tbl_Resources[[#Headers],[Seq'#]]").Select
        Selection.End(xlToRight).Select
        Selection.End(xlDown).Select
        ' create new row in current table
        Selection.ListObject.ListRows.Add AlwaysInsert:=False
        ' select first cell on new row
        Cells(ActiveCell.Row + 1, 1).Select
        ' use following to verify for debugging
        MsgBox "NewRow " & ActiveCell.Row ' << DISPLAYS CORRECT ROW AND CURSOR IS ON CORRECT CELL
        ActiveSheet.Paste ' <<< CRASHES HERE Paste Method of Worksheet Class Failed
    End Sub
    Any help is appreciated.

    Thanks,
    Jim
    Last edited by stubbsj; 07-28-2012 at 02:59 PM. Reason: Typo
    If I was able to help you, I would appreciate your reputation feedback by using the * icon in the lower left.

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