Hello I am using the following code for an input box and when I just click the cancel button that is given for the input box it still says " Incorrect Password" when I want it to just close out the inputbox. Sooo how do you code for if cancel then exit sub. Thanks.

myvalue = InputBox("Please Enter Password:", "Edit Agents")


If myvalue <> "manager" Then
ElseIf myvalue <> "manager" Then
MsgBox "Incorrect Password", vbOKOnly + vbInformation, "Denied"
Exit Sub
End If

IE:::::::::: but does not work
If Cancel = vbCancel Then
Exit Sub
End If