John,
It works fine for me,
Is Sheet1 definately called "Sheet1"? (i.e. the tab on the excel workbook
says "Sheet1".
What do you mean by doesn't work - it did take ages to run for me but that
may just be my laptop being funny.
Regards
Andi
"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
|