CONFIRM
Jump to navigation
Jump to search
Description
- Provides a pre-made confirmation dialog window which displays a "string" message. User responds by selecting "Yes" or "No". The selection is stored in responseVar$ as "yes" or "no" (lowercase values).
Syntax
- confirm "string"; responseVar$
- Use this form for multiline message
- confirm "line 1" + chr$(13) + "line 2" ...; responseVar$
Hints
- To test response, be sure to test against lowercase "yes" or "no". Testing against uppercase, or mixed-case, can produce false results.
- The "Yes" button is the default; pressing the Enter key returns "yes".
- You cannot change the caption on a CONFIRM window.
Example
' A basic CONFIRM dialog with multiline message. confirm "Are you sure " + chr$(13) + "you want to QUIT?"; answer$ ' Test against lowercase response if answer$ = "yes" then print "Yes was selected" else print "No was selected" end if end
Useful Procedures
' Place a useful function using this keyword here