79087594

Date: 2024-10-14 20:16:28
Score: 2
Natty:
Report link

FYI, your code does not work... this one does.

Public Sub CopySheetAndRename() Dim newName As String

On Error Resume Next newName = InputBox("Enter the name for the copied worksheet")

If newName <> "" Then activeSheet.Copy After:=Worksheets(Sheets.Count) On Error Resume Next activeSheet.Name = newName End If End Sub

Reasons:
  • No code block (0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: Coder