I have the following code I'm trying to make into my template EXCEL workbook. The Code should be in 2 parts, and the first part works as intended.
Part 1. Using the "Template" sheet, copy the template tab and rename it for each item under the "TABIFY" sheet until it creates all the sheets with their names from the "TABIFY" sheet.
Part 2. I need the code to finish creating all the tabs, then DELETE the "TABIFY" & "TEMPLATE" sheets and prompt the user to "save as" a regular workbook without macros. (Our company blocks the email and share of macro enabled files) so I have the delete verbiage, but not sure how to write that in after the creation of the tabs or to prompt for save as non macro enabled workbook.
Sheets("TABIFY").Delete
Sheets("TEMPLATE").Delete
Thanks to anyone who can help!
Part 1. Using the "Template" sheet, copy the template tab and rename it for each item under the "TABIFY" sheet until it creates all the sheets with their names from the "TABIFY" sheet.
VBA Code:
Sub NewSheets()
Dim i As Integer
Dim ws As Worksheet
Dim sh As Worksheet
Set ws = Sheets("TEMPLATE")
Set sh = Sheets("TABIFY")
Application.ScreenUpdating = 0
For i = 2 To Range("A" & Rows.Count).End(xlUp).Row
Sheets("TEMPLATE").Copy After:=sh
ActiveSheet.Name = sh.Range("A" & i).Value
Next i
End Sub
Part 2. I need the code to finish creating all the tabs, then DELETE the "TABIFY" & "TEMPLATE" sheets and prompt the user to "save as" a regular workbook without macros. (Our company blocks the email and share of macro enabled files) so I have the delete verbiage, but not sure how to write that in after the creation of the tabs or to prompt for save as non macro enabled workbook.
Sheets("TABIFY").Delete
Sheets("TEMPLATE").Delete
Thanks to anyone who can help!