+ Reply to Thread
Results 1 to 3 of 3

Copy Method of Range Class Fail

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    09-06-2012
    Location
    New York
    MS-Off Ver
    Excel 2007
    Posts
    225

    Copy Method of Range Class Fail

    I am getting this error when I add the PasteSpecial method to the end of this code, but when I remove it there is no error. I need to be able to paste values, why am I getting this error?




    Intersect(PT.PivotFields("SUPERVISOR").PivotItems("MOE, LUCY").DataRange.EntireRow, _
        PT.PivotFields("TEMP AGE GROUP").PivotItems("> 81 Days").DataRange).Copy _
        Cells(LR, lMoe).Offset(1, 0).PasteSpecial(xlPasteValues)

  2. #2
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Copy Method of Range Class Fail

    you cannot perform a pastespecial as the destination argument of the copy method-it has to be two stages
    Intersect(PT.PivotFields("SUPERVISOR").PivotItems("MOE, LUCY").DataRange.EntireRow, _
        PT.PivotFields("TEMP AGE GROUP").PivotItems("> 81 Days").DataRange).Copy
        Cells(LR, lMoe).Offset(1, 0).PasteSpecial xlPasteValues
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  3. #3
    Forum Contributor
    Join Date
    09-06-2012
    Location
    New York
    MS-Off Ver
    Excel 2007
    Posts
    225

    Re: Copy Method of Range Class Fail

    That's a good rule to know, thank you!

+ 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