+ Reply to Thread
Results 1 to 4 of 4

Worksheet Names

  1. #1
    Registered User
    Join Date
    10-11-2004
    Posts
    69

    Worksheet Names

    Is there any way of generating a list a worksheet names, as opposed to Range Names, in a worksheet, or alternatively something that will reference a worksheet name, changing if the worksheet name is subsequently changed?

    I want to start putting explanation worksheets in my workbooks to explain how the worksheets interact and what their purposes are, so any comments along the lines of assisting with this would be gratefully received.

  2. #2
    Gary''s Student
    Guest

    RE: Worksheet Names

    This tiny macro will return worksheet names:

    Function nameit(i As Integer) As String
    Application.Volatile
    nameit = Worksheets(i).Name
    End Function


    For example, =nameit(1) will return the name of the first worksheet.
    =nameit(2) will return the name of the second worksheet, etc.
    --
    Gary's Student


    "Timmy Mac1" wrote:

    >
    > Is there any way of generating a list a worksheet names, as opposed to
    > Range Names, in a worksheet, or alternatively something that will
    > reference a worksheet name, changing if the worksheet name is
    > subsequently changed?
    >
    > I want to start putting explanation worksheets in my workbooks to
    > explain how the worksheets interact and what their purposes are, so any
    > comments along the lines of assisting with this would be gratefully
    > received.
    >
    >
    > --
    > Timmy Mac1
    > ------------------------------------------------------------------------
    > Timmy Mac1's Profile: http://www.excelforum.com/member.php...o&userid=15188
    > View this thread: http://www.excelforum.com/showthread...hreadid=574070
    >
    >


  3. #3
    Bob Phillips
    Guest

    Re: Worksheet Names

    Sub ListWorksheets()
    Dim i As Long

    For 1 = 1 To Activeworkbook.Worksheets.Count
    Cells(i,"A").Value = Activeworkbook.Worksheets(i).Name
    Next i

    End Sub

    --
    HTH

    Bob Phillips

    (replace somewhere in email address with gmail if mailing direct)

    "Timmy Mac1" <[email protected]> wrote
    in message news:[email protected]...
    >
    > Is there any way of generating a list a worksheet names, as opposed to
    > Range Names, in a worksheet, or alternatively something that will
    > reference a worksheet name, changing if the worksheet name is
    > subsequently changed?
    >
    > I want to start putting explanation worksheets in my workbooks to
    > explain how the worksheets interact and what their purposes are, so any
    > comments along the lines of assisting with this would be gratefully
    > received.
    >
    >
    > --
    > Timmy Mac1
    > ------------------------------------------------------------------------
    > Timmy Mac1's Profile:

    http://www.excelforum.com/member.php...o&userid=15188
    > View this thread: http://www.excelforum.com/showthread...hreadid=574070
    >




  4. #4
    Registered User
    Join Date
    10-11-2004
    Posts
    69
    Many thanks GS and BP

    (BP I think your macro should read "For i=1...." and not "For 1 = 1..." )
    Last edited by Timmy Mac1; 08-24-2006 at 11:58 AM.

+ 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