|
|
(10 intermediate revisions by 4 users not shown) |
Line 1: |
Line 1: |
| MSGBOX(''prompt''[, ''okCancel''])
| | MsgBox(''prompt''[, ''okCancel'']) |
|
| |
|
| '''Description'''
| | == Description == |
|
| |
|
| MSGBOX opens a dialog box, and waits for the user to tap on a button. The return value is an integer that indicates which button was tapped. The required parameter, ''prompt'', is a string expression that is displayed in the body of the dialog box. The optional parameter, ''okCancel'', is a numeric or constant expression that specifies whether to ask the user to choose between a Cancel and OK. The default value for okCancel is 0.
| | MsgBox opens a [[NSB.MsgBox]], and waits for the user to tap on a button. |
|
| |
|
| '''Table 15: okcancel constants'''
| |
|
| |
|
| {| class="wikitable"
| | == Related Items == |
| |-
| |
| ! Constant !! Value !! Description
| |
| |-
| |
| | vbOKOnly || 0 || OK Button only
| |
| |-
| |
| | vbOKCancel || 1 || OK and Cancel Buttons
| |
| |}
| |
|
| |
|
| '''Table 16: MSGBOX return values'''
| | [[inputbox|InputBox]] |
|
| |
|
| {| class="wikitable"
| | [[Category:Language Reference]] |
| |-
| |
| ! Constant !! Value !! Description
| |
| |-
| |
| | vbOK || 1 || OK
| |
| |-
| |
| | vbCancel || 2 || Cancel
| |
| |}
| |
|
| |
|
| '''Example'''
| | [[Category:Messages]] |
| | |
| <pre>
| |
| REM MSGBOX Example
| |
| 'MSGBOX displays a modal dialog box
| |
| DIM Continue
| |
| MSGBOX("Hello World!")
| |
| MSGBOX "Brief tour of MSGBOX", vbOK
| |
| Continue = MSGBOX("Continue tour?", 1)
| |
| IF Continue = vbYes THEN
| |
| Continue=MSGBOX("Short tour, huh?")
| |
| END IF
| |
| Continue = MSGBOX("Repeat tour?", 1)
| |
| IF Continue = vbCancel THEN
| |
| MSGBOX("Goodbye!")
| |
| END IF
| |
| </pre>
| |
| | |
| '''Output'''
| |
| | |
| '''Related Items'''
| |
| | |
| [[inputbox|INPUTBOX]] | |
MsgBox(prompt[, okCancel])
Description
MsgBox opens a NSB.MsgBox, and waits for the user to tap on a button.
Related Items
InputBox