I would like to have a button that a user can click to copy an existing sheet and rename with a unique name. The code below satisfies that need. Now, I need a way to catch an exception if the user tries to add a duplicate sheet name. Any help is greatly appreciated.
Dim strName As String strName = InputBox("Enter new sheet name") If strName = "" Then Exit Sub 'If sheet name already exists then End If ActiveSheet.Copy After:=ActiveSheet ActiveSheet.Name = strName