Hi Guys, I have a worksheet that has the following tabs:
1. Template
2. List
The Template tab is like the base tab.
The List tab has a list of numbers in column A that starts in row 2. Row 1 contains the header. The items in the List tab varies.
What the worksheet does are as follows:
1. Duplicate the Template tab to as many times as the number of items there are in the List tab (starting in row 2).
2. Each new tab should is renamed according to the values from the List tab
So if there are 3 items on the List tab like, 123,456, and 789. The new duplicate tabs are named as 123, 456, and 789.
The VBA on the worksheet is able to do that. However, I would like to make additional changes.
1. After a new duplicate is made and renamed, whatever the name of the new duplicate tab should also be written/pasted "as values" in cell C2.
So from the same example as above, if the new duplicate tab is renamed into 123, the number 123 should also be written/pasted "as values" in cell C2.
2. If the name of a newly duplicated tab already exists, a messagebox would appear and say something then stops and exits the sub.
The code is show below.
Bookmarks