BYE
Description
BYE terminates the current program and closes the output window. BYE can be called from within a FUNCTION procedure or SUB procedure, but it will have no effect unless the procedure is called in a chain of procedures that was started by an event sent from the operating system.
Example
REM BYE Statement
'BYE closesoutputwindow andendstheprogram
DIM When, In10
In10=MSGBOX("Closein10 seconds?",vbYESNO)
IF In10 = vbYES THEN
PRINT "Closing in 10 seconds..."
When = DATEADD("s", 10, NOW)
WHILE NOW < When
'Doing nothing for 10 seconds
WEND
BYE
END IF
SUB Output_Click()
Quit
END SUB
SUB Quit
BYE
END SUB
Output
Open for 10 seconds...
(output window closes)
Related Items