Somebody please tell me what is wrong with this code?
It does not loop thru all sheet names.
Thanks in advance
Code:
Sub runt()
Dim sh As Worksheet
Dim i As Integer
For i = 1 To Sheets.Count
For Each sh In Sheets
Sheets("sheet1").Cells(i, 1).Value = sh.Name
Next sh
Next i
End Sub
It does not loop thru all sheet names.
Thanks in advance