Group: Flow Control
The end instruction causes the macro to terminate immediately. If the macro was run by another macro using the MacroRun instruction then that macro continues on the instruction following the MacroRun.
L$ = UCase$(InputBox$("Enter End:"))
If L$ = "END" Then End
Debug.Print "End was not entered."
Debug.Print "Before DoSub"
Debug.Print "After DoSub"