+ Reply to Thread
Results 1 to 3 of 3

Thread: Copy the active worksheet

  1. #1
    Valued Forum Contributor
    Join Date
    04-11-2006
    MS-Off Ver
    2007
    Posts
    419

    Copy the active worksheet

    Hello all,

    I have this macro created with macro recorder that makes a copy of my worksheet

    Sub copy_worksheet
     Sheets("Green").Copy After:=Sheets(1)
    End sub
    How can I change this to copy the ACTIVE worksheet instead of the named worksheet?

    thanks
    Last edited by duugg; 06-30-2009 at 02:10 PM.

  2. #2
    Forum Guru, retired Admin royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    25,639

    Re: Copy the active worksheet

    Just a slight amendment
    Sub copy_worksheet
    ActiveSheet.Copy After:=Sheets(WorkSheets.Count)
    End sub
    Hope that helps.

    RoyUK
    --------
    If you are pleased with a member's answer then use the Star icon to rate it, if you are pleased enough to part with cash consider a donation to Children in Need

    For Excel Tips & Solutions, free examples and tutorials why not check out my downloads

    New members please read & follow the Forum Rules

    Remember to mark your questions Solved and rate the answer(s)

  3. #3
    Valued Forum Contributor
    Join Date
    04-11-2006
    MS-Off Ver
    2007
    Posts
    419

    Re: Copy the active worksheet

    Thanks Roy!

+ 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.2.0