Return to Snippet

Revision: 70707
at July 13, 2016 01:14 by cueballrawn


Updated Code
Sub SheetNames()
Columns(1).Insert
    For i = 1 To Sheets.Count
        Cells(i, 1) = Sheets(i).Name
    Next i
End Sub

Revision: 70706
at June 13, 2016 20:14 by cueballrawn


Initial Code
Sub SheetNames()
    
Columns(1).Insert
    
    For i = 1 To Sheets.Count
        Cells(i, 1) = Sheets(i).Name
    Next i
    
End Sub

Initial URL

                                

Initial Description
This inserts a new column in the active worksheet and lists all the worksheet names, using a row for each name. Useful if you have lots of worksheets names that you want to reference accurately.

Initial Title
Excel (VBA) create list of all worksheet names in workbook

Initial Tags
list

Initial Language
Visual Basic