Sub CopyMasterSheet()
Dim newSheet As Worksheet, newName As String, msg As String
Application.ScreenUpdating = False
'copy the sheet
Sheets("Master").Copy after:=Sheets(Sheets.Count)
Set newSheet = Sheets(Sheets.Count)
'ask user for new name
newName = "WF-" & InputBox("do NOT begin with WF-" & vbCr & "which is automatically inserted", "Enter New Sheet Name")
msg = Rejected(newName)
'test the name
msg = NameBad(newName, newSheet)
If Len(msg) > 0 Then Call DeleteSheet(newSheet, msg)
End Sub
Private Function NameBad(newName As String, newSheet As Worksheet) As String
On Error Resume Next
newSheet.Name = newName
If Err.Number <> 0 Then NameBad = "Cannot use that sheet name"
On Error GoTo 0
End Function
Private Function Rejected(newName As String) As String
If MsgBox(newName, vbOKCancel, "Confirm name") = vbCancel Then Rejected = "name rejected by user"
End Function
Private Sub DeleteSheet(newSheet As Worksheet, msg As String)
Application.DisplayAlerts = False
newSheet.Delete
Application.DisplayAlerts = True
MsgBox msg, , ""
End Sub