Hello!
The code below continues to error out at the section below. Any thing I can use to determine why? Or adjustments I can make to the code?
The code below continues to error out at the section below. Any thing I can use to determine why? Or adjustments I can make to the code?
VBA Code:
wkbTemplate.SaveAs strSavePath & rng.Value
VBA Code:
Public Sub SaveTemplate()
Const strSavePath As String = "C:\My Documents\"
Const strTemplatePath As String = "C:\My Documents\template.xls"
Dim rngNames As Excel.Range
Dim rng As Excel.Range
Dim wkbTemplate As Excel.Workbook
Set rngNames = ThisWorkbook.Worksheets("Name Index").Range("A1:A100").Values
Set wkbTemplate = Application.Workbooks.Open(strTemplatePath)
For Each rng In rngNames.Cells
wkbTemplate.SaveAs strSavePath & rng.Value
Next rng
wkbTemplate.Close SaveChanges:=False
End Sub