Closed Thread
Results 1 to 2 of 2

Specify which sheet to paste to

  1. #1
    Paul LeBlanc
    Guest

    Specify which sheet to paste to

    I have recorded a simple macro and want to specify that it always pastes into
    the sheet named 'Link'
    here is my current code
    Sub McrUpdateLink()
    '
    ' McrUpdateLink Macro
    ' Macro recorded 06/15/2006
    '

    '
    Cells.Select
    Selection.Copy
    ActiveSheet.Previous.Select
    Cells.Select
    Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
    False, Transpose:=False
    Application.CutCopyMode = False
    Range("A2").Select
    ActiveSheet.Next.Select
    Range("H2").Select
    End Sub


  2. #2
    Forum Expert Simon Lloyd's Avatar
    Join Date
    03-02-2004
    Location
    locked in the cage
    MS-Off Ver
    All the ones my homepage shows
    Posts
    3,161
    I have changed a couple of lines below, not tried them but give it a go it should work

    Regards,
    Simon

    Sub McrUpdateLink()
    '
    ' McrUpdateLink Macro
    ' Macro recorded 06/15/2006

    Cells.Select
    Selection.Copy
    ActiveSheet.Previous.Select
    Cells.Select
    Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
    False, Transpose:=False
    Application.CutCopyMode = False
    Range("A2").Select
    Sheets("Link").Select 'I think this is the line you need
    Range("H2").Select
    ActiveSheet.paste 'and this one to paste in to H2 on the sheet named Link
    End Sub

Closed 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