I have an Excel VBA program using the following line to prepare to copy data from one worksheet to another:
ActiveSheet.Name = “Med1S”
When executed, this line generates error 1004 – “That name is already taken. Try a different one.”
I understand that this error is generated when you try to create/rename a tab to an existing name, not assign the active sheet to an existing tab (see below).