I would check if the sheet name exists before setting it though.Code:Sub CopyAndRenameSheet() Sheets("2018").Copy Before:=Sheets(1) With ActiveSheet .Name = "2018 NewSheetName" .Unprotect '(do other stuff . . . ) End With End Sub
I would check if the sheet name exists before setting it though.Code:Sub CopyAndRenameSheet() Sheets("2018").Copy Before:=Sheets(1) With ActiveSheet .Name = "2018 NewSheetName" .Unprotect '(do other stuff . . . ) End With End Sub
Bookmarks