I have code so far that will copy and paste the tabs based on the number of instances I input. But I would like to add a feature to allow the user to input the names of these tabs without using multiple input boxes. I need the tab to say "Summary: ______" Where the ________ each time is going to have another number/letter reference such as XX-10. So the tabs should read "Summary: XX-10" And then maybe a second tab is "Summary: XX-57"
The way I have it set up so far is the user as all of coln A (except A1) to list those number methods (XX-10, YY-50, ect). The user then clicks a button to start the macro. A dialog box pops up saying "How many tests are there?" The user then inputs a number lets say 5. I would then want 5 summary tabs to be generated with the naming I described above.
Here is the code I have so far.
Thank you for any help you can give me on this!
The way I have it set up so far is the user as all of coln A (except A1) to list those number methods (XX-10, YY-50, ect). The user then clicks a button to start the macro. A dialog box pops up saying "How many tests are there?" The user then inputs a number lets say 5. I would then want 5 summary tabs to be generated with the naming I described above.
Here is the code I have so far.
Code:
Private Sub AddTabs_Click()
Set wBk = ActiveWorkbook
Dim NumTabs As Variant
NumTabs = InputBox("How many FGs are there?", "Add tabs", 1)
For i = 1 To NumTabs - 1
With wBk
Sheets("Summary").Select
Sheets("Summary").Copy After:=Sheets(Sheets.Count)
End With
Next i
End Sub