Hello!
In the code below, I have a button on a user form creating a new sheet based from a template sheet, and renaming it. I want to know if its possible to have this sheet being created and renamed to be created in a different workbook? Anything helps. Thanks.
Code:
<tbody>
</tbody>
In the code below, I have a button on a user form creating a new sheet based from a template sheet, and renaming it. I want to know if its possible to have this sheet being created and renamed to be created in a different workbook? Anything helps. Thanks.
Code:
Dim i as byte, sh as worksheet for i=1 to 5 Sheets("TEMPLATE").Copy after:=sheets("TEMPLATE") set sh = activeSheet ' Do whatever you have to do with the new sheet sh.Name = AddEmployeeUF.txtFirstname.Text + AddEmployeeUF.txtMiddleinitial.Text + AddEmployeeUF.txtLastname.Text + "Template" ws.Hyperlinks.Add Anchor:=ws.Range("F" & LastRow), Address:="", SubAddress:=sh.Name & "!A1", TextToDisplay:="View" Next I |
<tbody>
</tbody>