If your list is a value of items within an excel worksheet, and you want to add tabs based on that list, you COULD do something like this:
On Error Resume Next
Dim arrData() As Variant
arrData = Range("D5:D9").Value
For Each cData In arrData
If cData <> "" Then
Worksheets.Add(After:=Worksheets(Worksheets.Count)).Name = cData
Worksheets(cData).Range("B3") = cData
Assumptions for the above:
- List of names is on same worksheet as the button.
- List is on same workbook as the button.
Worksheets(cData).Range("B3") = cData is the part that adds the worksheet name to the new sheet in cell
If you can specify where your list is located in a simliar manner; if it's not on the same sheet as the button, then specify the proper value in the
arrData = Range() portion of the VBA file, such as:
arrData = Worksheets("SourceSheet").Range("D5:D9").Value.