+ Reply to Thread
Results 1 to 3 of 3

function that will update worksheet names

  1. #1
    Registered User
    Join Date
    07-19-2006
    Location
    Jamaica
    Posts
    86

    function that will update worksheet names

    Hi,

    I have a workbook that has 36 worksheets that all function as holidayschedules. Additionally there are two worksheets that function as a master data sheet and another that works as a helper/info sheet.

    In the master data sheet I have a startdate which the 36 sheets refer to and then adds the correct amount of days to give the first day of that particular month.

    The 36 sheets are supposed to be named
    MMM-YY

    How do I have excel automatically rename the sheets if the startdate changes? The startdate can only change in yearly increments and will always start at 01-Jan.

    /Møller
    --
    M?ller

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hello c991257,

    Before adding this macro to the worksheet that contains the start date of 01-Jan, you will need to change the cell address in the macro to match the start date's cell address. It is marked in red.
    Please Login or Register  to view this content.
    How to Save a Worksheet Event Macro
    1. Copy the macro using CTRL+C keys.
    2. Open your Workbook and Right Click on the Worksheet's Name Tab for the Worksheet the macro will run on.
    3. Left Click on View Code in the pop up menu.
    4. Paste the macro code using CTRL+V
    5. Save the macro in your Workbook using CTRL+S

    Sincerely,
    Leith Ross

  3. #3
    Registered User
    Join Date
    07-19-2006
    Location
    Jamaica
    Posts
    86
    Thanks Ross,

    This actually leaves me with a new issue, which is that I actually won't be able to link between the different sheets when their names change.

    Unless I make a link to another page that lists the pagenames but that will really be a mess.

    As I understand it Excel can't link to next sheet or previous sheet.

    I probably need to find another solution.

    /Møller
    Last edited by Paul; 09-27-2008 at 01:55 PM. Reason: Removed unnecessary quote of entire previous post.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Add Worksheet Names to an Array
    By kingdt in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-27-2008, 08:25 AM
  2. Replies: 0
    Last Post: 08-15-2008, 08:24 PM
  3. Adding a Hyperlink to a List of Worksheet Names
    By rdgreen in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-12-2008, 07:21 PM
  4. Excel 2007 : Worksheet Tab Names Change
    By elecates in forum Excel General
    Replies: 0
    Last Post: 06-26-2008, 02:56 PM
  5. add worksheet in custom function
    By djoella in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-10-2007, 05:53 PM

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