+ Reply to Thread
Results 1 to 2 of 2

Copy/Paste from one sheet to another

  1. #1
    Registered User
    Join Date
    04-14-2009
    Location
    Columbus
    MS-Off Ver
    Excel 2003
    Posts
    13

    Copy/Paste from one sheet to another

    I am new to VBA Excel programming. The following code goes to the Raw Data worksheet selects some cells, then moves back to the Combined Data worksheet and copies them. Unfortunately, the SENDKEYS that I am using at the bottom does not work. Can you think of another way that I can execute this procedure?

    Sub ActivateSheet()
    Sheets("RawData").Activate
    Range("A1").Activate
    ActiveCell.CurrentRegion.Select
    ActiveCell.CurrentRegion.Copy
    Sheets("Combined Data").Select
    Range("A1").Activate

    Do While Not IsEmpty(ActiveCell)
    ActiveCell.Offset(1, 0).Select
    Loop
    Application.SendKeys "{ENTER}"
    End Sub

    Thanks, Susie

  2. #2
    Forum Expert Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007, 2010
    Posts
    3,978

    Re: Copy/Paste from one sheet to another

    All you need is:
    Please Login or Register  to view this content.
    Tip: It is best to use the sheet code name rather than the worksheet name (i.e. "Combined Data"), as you won't have issues with the code if worksheet gets renamed.

    Try this link for more information: Sheet/Worksheet CodeNames

+ 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