Good Evening All or Good Day depending on your time zone...
I have a workbook that I am setting up as a Template, I have 3 Template Sheets in the Workbook. They all have 1 Table located on them.
I have a basic VBA Code to Copy the Template, Rename the Template but I cannot get or find a way to Rename the Tables on the New Sheets.
The Code I have is:
What I was hoping to do was to add in ListObjects.Name=D.Value
An set that up as part of the "For" section like it does for "C"
I have this Code listed 3 times, 1 for Each Template. Mainly because it didnt stop when i set the Range like this E1:E10...
Where did I make the left turn toward Albuquerque?
I have a workbook that I am setting up as a Template, I have 3 Template Sheets in the Workbook. They all have 1 Table located on them.
I have a basic VBA Code to Copy the Template, Rename the Template but I cannot get or find a way to Rename the Tables on the New Sheets.
The Code I have is:
Code:
Sub CopyTempWeeklySheets()
Dim sh1 As Worksheet, sh2 As Worksheet, C As Range
Set sh1 = Sheets("Template Weekly")
Set sh2 = Sheets("Controls 2")
For Each C In sh2.Range("F44", sh2.Cells(Rows.Count, 6).End(xlUp))
sh1.Copy After:=Sheets(Sheets.Count)
ActiveSheet.Name = C.Value
Next
End Sub
What I was hoping to do was to add in ListObjects.Name=D.Value
An set that up as part of the "For" section like it does for "C"
I have this Code listed 3 times, 1 for Each Template. Mainly because it didnt stop when i set the Range like this E1:E10...
Where did I make the left turn toward Albuquerque?