Consulting

Results 1 to 2 of 2

Thread: Solved: paste to offset cell not working

  1. #1
    VBAX Expert CatDaddy's Avatar
    Joined
    Jun 2011
    Posts
    581
    Location

    Solved: paste to offset cell not working

    trying to paste alternating rows from two different sheets to a new sheet called SheetName:

    [VBA]
    For i = 5 To 22

    copyRow = i & ":" & i

    Sheets("Tempe").Select
    Rows(copyRow).Select
    Application.CutCopyMode = False
    Selection.Copy

    Sheets(SheetName).Activate

    With ActiveSheet
    ActiveCell.Offset(1, 0).Select
    Selection.Paste
    End With

    copyRow = (i + 3) & ":" & (i + 3)

    Sheets("Atlanta").Select
    Rows(copyRow).Select
    Application.CutCopyMode = False
    Selection.Copy

    Sheets(SheetName).Activate
    With ActiveSheet
    ActiveCell.Offset(1, 0).Select
    Selection.Paste
    End With

    Next i
    [/VBA]

    getting object doesnt support method on the selection.paste line :/

  2. #2
    VBAX Expert CatDaddy's Avatar
    Joined
    Jun 2011
    Posts
    581
    Location
    does not need "With ActiveSheet", just:

    [VBA]
    ActiveCell.Offset(1,0).Select
    ActiveSheet.Paste
    [/VBA]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •