I would like to list all worksheet tab names on one sheet
such that when a new sheet is added, the list will
automatically update
-----Original Message-----
If you are trying to put the tab name into cell a1 on
each sheet, use this
Sub shtname()
For Each sht In Worksheets
sht.Range("a1") = sht.Name
Next
End Sub
--
Don Guillett
SalesAid Software
"johnT" wrote in
message
...
does anybody know why this doesn't work:
Private Sub Workbook_NewSheet(ByVal Sh As Object)
Set rng = Worksheets("Sheet1").Range("A1")
i = 1
For Each sht In Worksheets
rng(i, 1) = sht.Name
i = i + 1
Next
End Sub
.
|