All the the code works except I need the new sheets to be copied from the sheet named template. Here is the code.

Sub add_sheets()

Dim wks As Worksheet
Dim rng As Range
Dim LastRow As Long
Dim I As Long

LastRow = Sheets("Summary").Range("A" & Rows.Count).End(xlUp).Row

For I = 1 To LastRow
Set rng = Sheets("Summary").Range("A" & I)
Set wks = Worksheets.Add(After:=Worksheets(Worksheets.Count - 1))
wks.Name = rng.Value
Next I

Sheets("Summary").Select
Range("A1").Select

End Sub

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

I tried this but it doesnt work.

Sub add_sheets_test()

Dim wks As Worksheet
Dim rng As Range
Dim LastRow As Long
Dim I As Long

LastRow = Sheets("Summary").Range("A" & Rows.Count).End(xlUp).Row

For I = 1 To LastRow
Set rng = Sheets("Summary").Range("A" & I)
Set wks = Worksheets("Template").Copy(After:=Worksheets(Worksheets.Count - 1))
wks.Name = rng.Value
Next I

Sheets("Summary").Select
Range("A1").Select

End Sub

Any suggestions?