Abhishek Pratap Singh
New Member
I have data in the workbook, with 46 sheets. And I want to rename the sheet, starting from January 2016, to may 2019. Need VBA for the same. Format - January, February and so on.
Sub RenameSheets()
Dim ws As Worksheet
Dim i As Integer
Dim StartDate As Date
StartDate = "01/01/2016"
For i = 1 To ThisWorkbook.Worksheets.Count
ThisWorkbook.Worksheets(i).Name = MonthName(Month(StartDate)) & " " & Year(StartDate)
StartDate = DateAdd("m", 1, StartDate)
Next
End Sub