+ Reply to Thread
Results 1 to 4 of 4

VBA Code - Copy & Insert copy to another worksheet.

  1. #1
    Registered User
    Join Date
    09-16-2012
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    6

    VBA Code - Copy & Insert copy to another worksheet.

    Hi All,

    I'm in a pickle with my super basic coding skills.
    I am trying to copy a range of cells from one sheet to another. My code I have created is working for copying my range of data to the last row of my active worksheet. HOWEVER.... I actually want to paste that data at the top of the active worksheet. A simple insert of my copied cells by shifting all other rows down.

    Two Sheet names are:
    1. Meeting Minutes (this is my active worksheet)
    2. Sheet 2 (Template sheet, where I am copying my cell range from).

    My Current code is:

    Please Login or Register  to view this content.

    Can any one help me?
    Last edited by JBeaucaire; 09-17-2012 at 01:09 AM. Reason: Added code tags, as per forum rules. Don't forget!

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: VBA Code - Copy & Insert copy to another worksheet.

    Since "CommandButton" code is found in the sheet module, then you use the "Me." syntax to specify "the sheet in which this code is running."

    Please Login or Register  to view this content.
    If there is a chance the onscreen sheet is NOT the intended target for some bizarre reason, you cound change Me. to Activesheet.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    09-16-2012
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: VBA Code - Copy & Insert copy to another worksheet.

    Jerry... You are amazing!

    I tweaked the code a little to suit my headers and footers but works a charm.
    I click my command button and my data is inserted to the top of my spreadsheet.

    Thank you!

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: VBA Code - Copy & Insert copy to another worksheet.

    If that resolves your issue, please select Thread Tools from the menu above and mark the thread as solved. Thanks.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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