worksheet name
Amazing chart utilities from Jon Peltier
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 3 of 3

Thread: worksheet name

  1. #1
    New Member
    Join Date
    Apr 2002
    Posts
    6
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

     
    i have multiple worksheets in a file, and would like to know if i can list the worksheet names on another worksheet for a summary.


  2. #2
    MrExcel MVP
    Join Date
    Feb 2002
    Location
    Sydney, Australia
    Posts
    2,936
    Post Thanks / Like
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Default

    Hi,

    How about this?

    Code:
    Sub ListSheets()
    Dim shtEnum As Object, shtDest As Worksheet, lngRow As Long
    
    Set shtDest = Worksheets.Add
    On Error Resume Next
    shtDest.Name = "Sheet List"
    shtDest.Range("A1").Value = "Sheet name"
    
    lngRow = 2
    For Each shtEnum In ActiveWorkbook.Sheets
        If shtEnum.Name <> "Sheet List" Then
            shtDest.Cells(lngRow, 1).Value = shtEnum.Name
            lngRow = lngRow + 1
        End If
    Next shtEnum
    
    End Sub
    HTH,
    Dan

  3. #3
    Rest in Peace
    Join Date
    Feb 2002
    Posts
    1,582
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

      
    Hi


    Run this code on the sheet you want you names in:

    Code:
    Sub AllSheet()
    Dim i As Integer
    
        For i = 1 To ActiveWorkbook.Sheets.Count
            Cells(i, 1) = Sheets(i).Name
        Next i
     
    End Sub

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

 

 
DMCA.com