This is my first excel macro (and first time working with VBScript), so it is most likely wrong, but I’m trying to go through each sheet in my workbook, and rename the sheet to the value of the sheets “A2” cell’s value. As the name says, the function isn’t doing anything when I run it. It is running however. Here is my code:
Sub RenameSheets()
Dim WS_Count As Integer
Dim I As Integer
' Set WS_Count equal to the number of worksheets in the active
' workbook.
WS_Count = ActiveWorkbook.Worksheets.Count
' Begin the loop.
For I = 1 To WS_Count
ActiveSheet.Name = ActiveSheet.Range("A2").Value
Next I
End Sub
1 Answer