Can Excel list all of a workbook's worksheets on a worksheet?

  • Thread starter Thread starter bob.kennedy
  • Start date Start date
B

bob.kennedy

I'd like to get a list of all worksheets in a workbook so I can then
construct links to the same cell in each sheet.
 
Private Sub ListSheets()
'list of sheet names starting at A1
Dim rng As Range
Dim i As Integer
Worksheets.Add(After:=Worksheets(Worksheets.Count)).Name = "List"
Set rng = Range("A1")
For Each Sheet In ActiveWorkbook.Sheets
rng.Offset(i, 0).Value = Sheet.Name
i = i + 1
Next Sheet
End Sub


Gord Dibben MS Excel MVP
 
Back
Top