Sub GetShtNam()
Dim ShtNam As String
Dim i As Long
Application.ScreenUpdating = False
Range("A2:A" & Range("A" & Rows.Count).End(xlUp).Row).ClearContents
For i = 1 To Worksheets.Count
    ShtNam = Worksheets(i).Name
    Cells(i + 1, 1).Value = ShtNam
Next
Application.ScreenUpdating = True
End Sub

Regards, TMS