Hello, I have this code that has a couple of input boxes. I just noticed a flaw, if I press cancel or exit out, the code still runs. Is there a way to stop the code if user presses cancel on any of the input boxes and stops the code from creating a sheet?
Here is my code
Sub Add_Physician()
Dim employeeID As Variant
Dim LastName As Variant
Sheets("Template - Phys Standard").Copy Before:=Sheets(1)
employeeID = InputBox("Enter Employee ID")
LastName = InputBox("Enter Employee Last Name")
Sheets(1).Name = employeeID & "_" & LastName
Range("E7").Value = employeeID
End Sub
Thanks.
Bookmarks