+ Reply to Thread
Results 1 to 6 of 6

dynamic sheet tab names?

  1. #1
    Registered User
    Join Date
    02-05-2006
    Posts
    86

    Question dynamic sheet tab names?

    hi

    i would like the name of the worksheet to refer to a cell within the sheet, the month that the user selects from a dropdown menu?! cell C1. can this be done?!

    cheers

    millsy

  2. #2
    Forum Contributor wmorrison49's Avatar
    Join Date
    09-25-2007
    Posts
    267
    This workbook changes the name of the first tab to whatever is in cell A1.
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    02-05-2006
    Posts
    86
    that works!
    brilliant

    cheers
    millsy

  4. #4
    Forum Expert MickG's Avatar
    Join Date
    11-23-2007
    Location
    Banbury,Oxfordshire
    Posts
    2,650
    Hi, If your Drop down Box is from the "forms" menu and it is filled with Months of the Year, then you can use this.
    Please Login or Register  to view this content.
    Regards Mick

  5. #5
    Registered User
    Join Date
    07-18-2008
    Location
    India
    Posts
    68

    dynamic sheet tab names?

    Hi,

    The below given code will change the title of each sheet in the worksheet to whatever is in cell c1 of that sheet.

    Public Sub mysheet()
    Dim ws As Worksheet
    Dim shtName As String

    For Each ws In Worksheets
    shtName = ws.Name
    ws.Select
    Sheets(shtName).Name = Range("c1").Value
    Next ws
    End Sub

  6. #6
    Registered User
    Join Date
    01-25-2012
    Location
    Trenton, NJ
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: dynamic sheet tab names?

    Quote Originally Posted by wmorrison49 View Post
    This workbook changes the name of the first tab to whatever is in cell A1.
    Hello! I've tried simply copying and pasting the code into other worksheets, but that doesn't seem to do it. Is there something I need to enable in each sheet for this to work? Sheet one works just as hoped, changing upon enter. When I try to replicate this in sheets 2 and three, the name doesn't change.

    Thanks!

+ 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