+ Reply to Thread
Results 1 to 3 of 3

Naming Worksheet

  1. #1
    Denis
    Guest

    Naming Worksheet

    I am wanting to automatically name a range of worksheets based on the values
    contained in a range of cells located in another worksheet in the same
    workbook.

    Can this be done and how would I go about it
    --
    Denis

  2. #2
    Chip Pearson
    Guest

    Re: Naming Worksheet

    Denis,

    Try something like the following. It will change the name of the
    first sheet in the workbook to the value in A1 of Sheet3.

    Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target
    As Range)
    If Sh.Name = "Sheet3" And Target.Address = "$A$1" Then
    Worksheets(1).Name =
    Worksheets("Sheet3").Range("A1").Text
    End If
    End Sub

    --
    Cordially,
    Chip Pearson
    Microsoft MVP - Excel
    Pearson Software Consulting, LLC
    www.cpearson.com




    "Denis" <[email protected]> wrote in message
    news:[email protected]...
    >I am wanting to automatically name a range of worksheets based
    >on the values
    > contained in a range of cells located in another worksheet in
    > the same
    > workbook.
    >
    > Can this be done and how would I go about it
    > --
    > Denis




  3. #3
    Gord Dibben
    Guest

    Re: Naming Worksheet

    Denis

    Sub NameWS()
    'name sheets from data list in A1:A10 on first sheet
    For i = 2 To 10
    Sheets(i).Name = Sheets(1).Cells(i, 1).Value
    Next
    End Sub


    Gord Dibben Excel MVP

    On Tue, 13 Sep 2005 06:35:06 -0700, "Denis" <[email protected]>
    wrote:

    >I am wanting to automatically name a range of worksheets based on the values
    >contained in a range of cells located in another worksheet in the same
    >workbook.
    >
    >Can this be done and how would I go about it



+ 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