+ Reply to Thread
Results 1 to 4 of 4

Copy Worksheet into Same Workbook

Hybrid View

boldcode Copy Worksheet into Same... 11-29-2011, 09:53 AM
TMS Re: Copy Worksheet into Same... 11-29-2011, 09:56 AM
tom1977 Re: Copy Worksheet into Same... 11-29-2011, 10:05 AM
boldcode Re: Copy Worksheet into Same... 11-29-2011, 10:11 AM
  1. #1
    Forum Contributor
    Join Date
    04-20-2011
    Location
    New York, New York
    MS-Off Ver
    Excel 2010
    Posts
    160

    Copy Worksheet into Same Workbook

    Hello,

    I would like to create some vba code to copy the Active Worksheet into the Same Workbook. I want the copied worksheet to take on the name of the Active Worksheet with the string "2nd R" attached to it.

    This new copied worksheet should come at the end of all the worksheets in the workbook.

    That's it!

    Thanks,

    BC
    Last edited by boldcode; 11-29-2011 at 10:11 AM. Reason: SOLVED BY tom1977

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,549

    Re: Copy Worksheet into Same Workbook

    Record a macro while you carry out the actions manually for the basic code.


    Regards
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Expert
    Join Date
    09-27-2011
    Location
    Poland
    MS-Off Ver
    Excel 2007
    Posts
    1,312

    Re: Copy Worksheet into Same Workbook

    hi try this
    Sub aa()
    ActiveSheet.Copy after:=Sheets(Sheets.Count)
    ActiveSheet.Name = Replace(ActiveSheet.Name & "2nd R", "(2)", "")
    End Sub
    Last edited by tom1977; 11-29-2011 at 10:11 AM.
    Regards

    tom1977

    If You are satisfied with my solution click the small star icon on the left to say thanks.

  4. #4
    Forum Contributor
    Join Date
    04-20-2011
    Location
    New York, New York
    MS-Off Ver
    Excel 2010
    Posts
    160

    Re: Copy Worksheet into Same Workbook

    tom1977,

    Thanks for you help that worked as intended!

+ 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