I'm copying a sheet to another workbook using this VBA code:
Sub Macro1()
Dim num As Integer
Dim tbox As TextFrame2
Sheets("2316 Printing Template (v2018)").Select
Range("AS9").Select
For i = 1 To 2
Range("AS9").Value = i
Sheets("2316 Printing Template (v2018)").Copy After:=Workbooks("Book1.xlsx").Sheets(i)
With ActiveSheet.UsedRange
.Value = .Value
End With
Worksheets("2316 Printing Template (v2018)").Name = Left(Range("AS12").Value, 31)
Windows("2316 PrinterTemplate (2022).xlsm").Activate
Next i
End Sub
As the value of Cell AS9 changes, the template's cells and textboxes update. I then duplicate the template to a different workbook and rename the newly created sheet. The textboxes are still connected to the original workbook and sheet, which is my current issue. How can I change them to be tied to values?
Here is a screenshot of the 2 files. The First one is the template:
And this is the copied sheet: