For my ease, I have created a button on the click of which all the sheets will be created.
To create the button, the code is :
Sub AddButton()
Set btn = ActiveSheet.Buttons.Add(0, 90, 100, 25)
btn.OnAction = "CreateNewSheet"
btn.Characters.Text = "CreateSheets"
End Sub
To create sheets:
Sub CreateNewSheet()
For i = 65 To 90
Sheets.Add.Name = Chr(i) ' Ascii representation of A to Z is 65 to 90
Next i
End Sub
No comments:
Post a Comment