Hi there,
I have a vba script which duplicates a template sheet, then renames it with a name that user types into a cell.
Example:
User inputs the name "Dean" into cell A2 (on sheet "ADD") then runs the macro - a sheet called TEMPLATE is duplicated, then renamed into Dean. I want to check if the name already exists and perform a warning msg box if so. I am using the below code which duplicates the TEMPLATE sheet and instead of giving me a warning it renames it to TEMPLATE (2). Where did I miss the point? Thank you in advance.
I have a vba script which duplicates a template sheet, then renames it with a name that user types into a cell.
Example:
User inputs the name "Dean" into cell A2 (on sheet "ADD") then runs the macro - a sheet called TEMPLATE is duplicated, then renamed into Dean. I want to check if the name already exists and perform a warning msg box if so. I am using the below code which duplicates the TEMPLATE sheet and instead of giving me a warning it renames it to TEMPLATE (2). Where did I miss the point? Thank you in advance.