how a GoTo statement works:
Sub GoToDemo() userName = InputBox("Enter Your Name: ") If userName <> "123" Then GoTo WrongName MsgBox ("Welcome Bill...") ' ...[More code here] ... Exit Sub WrongName: MsgBox "Sorry." End Sub