I have the code below in an Add-In that creates and names 3 worksheets at the end of existing sheets. However, because of a change, I can no longer have the list with the worksheet names in the "Business Structure" worksheet.
I have searched for a solution, but was not able to find anything. Ideally I want the names of the 3 sheets to be "housed"directly in the macro itself (ie no need to refer to a list in a worksheet). The 3 files are created (in order) SPSJnl, AssJnl & VolJnl
Here is my code:
Any advise would be appreciated.
I have searched for a solution, but was not able to find anything. Ideally I want the names of the 3 sheets to be "housed"directly in the macro itself (ie no need to refer to a list in a worksheet). The 3 files are created (in order) SPSJnl, AssJnl & VolJnl
Here is my code:
Code:
For i = 1 To 3
Worksheets.Add after:=Worksheets(Worksheets.Count)
Sheets(Worksheets.Count).Name = Worksheets("Business Structure").Cells(i, 17).Value
Next i
End With
Any advise would be appreciated.