Sub Add_Physician()
Dim myDetails(1), x, i As Long
x = Array("ID", "Last Name")
For i = 0 To 1
myDetails(i) = InputBox("Enter Employee " & x(i))
If myDetails(i) = "" Then Exit Sub
Next
myDetails(1) = Join(myDetails, "_")
'↓ you also need to see if the named sheet is already exists or not.
If Not Evaluate("isref('" & myDetails(1) & "'!a1)") Then
Sheets("Template - Phys Standard").Copy Sheets(1)
Sheets(1).Name = myDetails(1)
End If
With Sheets(myDetails(1))
.Activate
.Range("E7").Value = myDetails(0)
End With
End Sub
Bookmarks