RAJAQ
11/25/2016 - 8:56 AM

Excel VBA Learning Project Be careful - it will delete any data in cell A1 before inserting the name of the sheet.

Excel VBA Learning Project Be careful - it will delete any data in cell A1 before inserting the name of the sheet.

Public Sub UseSheet()
    
    '  Write the sheet name to A1 in every sheet
    Dim sheet As Variant
    For Each sheet In ThisWorkbook.Worksheets
        sheet.Range("A1") = sheet.Name
    Next sheet

End Sub