+ Reply to Thread
Results 1 to 6 of 6

Copy sheets and rename from a list

  1. #1
    Registered User
    Join Date
    03-23-2009
    Location
    rome
    MS-Off Ver
    Excel 2003
    Posts
    3

    Copy sheets and rename from a list

    Hi guys!

    I need to create a macro that will do the following:
    1. copy an already existing sheet (named: "master")
    2. rename it with a name contained in a list (on sheet "list")
    3. move the sheet at the end of the workbook
    4. loop til the last value of the list

    the macro should be launched several times and therefore should recognize already existing sheets avoiding duplicates

    I tried the following code but it punctually stops after the 17th sheet instead of going to the end of the list (approx 30 values).
    What's wrong?

    Tx a lot for ur help!
    Fone


    Please Login or Register  to view this content.
    Last edited by foneexcel; 03-23-2009 at 08:40 AM.

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Copy sheets and rename from a list

    Welcome to the forum.

    Please take a few minutes to read the forum rules, then edit your post to add code tags.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Forum Contributor
    Join Date
    02-27-2008
    Posts
    764

    Re: Copy sheets and rename from a list

    Hi
    try the following codes (which worked for me upto 50 sheets)
    Please Login or Register  to view this content.
    Ravi

  4. #4
    Registered User
    Join Date
    03-23-2009
    Location
    rome
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Copy sheets and rename from a list

    Hi ravi!

    thanks a lot for ur suggestion ... unfortunately it keeps giving me the same error... it goes up to a random number of copies and then I get "run-time error 1004" copy method of worksheet class failed"

    then if I try to re-launch the macro it doesn't work and goes into debug

    can anyone help please?
    thanks again
    f

  5. #5
    Registered User
    Join Date
    03-23-2009
    Location
    rome
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Copy sheets and rename from a list

    I got that the problem is the content of the sheet to be copied... it is a range of 25 column/100 rows of VLOOKUP.

    Is there any way to create empty sheets - named on the basis of a list - and then copy and past the content of cells from a "master file" ?

    thank you

  6. #6
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Copy sheets and rename from a list


+ 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