+ Reply to Thread
Results 1 to 4 of 4

renaming tabs macro

  1. #1
    Forum Contributor
    Join Date
    12-12-2012
    Location
    Los Angeles
    MS-Off Ver
    Excel 2010
    Posts
    448

    renaming tabs macro

    Hell. I have the following code. The purpose is to take column A code number, the corresponding name (1, Alice, for example) and then rename all the sheets to that combined name. There are ten sheets (1-10) that start at worksheet four (after a couple of instruction sheets). An error comes up and says "can't assign to array" What does this mean?

    Also, this is just an exercise. I know there is a better way to do this. I was instructed to use one for loop, and at least one array variable, which I believe that I've done. In addition to fixing my code can someone suggest more efficient ways of the doing the renaming. The Codes are in column 1, the names are in column 2, in the "Data" tab, which is 3rd tab in the workbook. The fourth tab starts the sheets (1-10) Please help!!!!


    Please Login or Register  to view this content.
    Last edited by JBeaucaire; 06-17-2013 at 10:23 AM. Reason: Added CODE tags, as per Forum Rules. Take a moment to read the Forum Rules in the menu bar above. Thanks.

  2. #2
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: renaming tabs macro

    Suggest the following syntax to specify the element of the array.

    Please Login or Register  to view this content.

  3. #3
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: renaming tabs macro

    Try like this...

    Please Login or Register  to view this content.


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  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: renaming tabs macro

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.
    Thanks.
    _________________
    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!)

+ 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