MsgBox Method

The MsgBox method displays a message in a dialog box.

Syntax

MsgBox(prompt, [buttons], [title])

Parameters

prompt

Required. String displayed as the message in the dialog box.

buttons

Optional. Numeric expression that is the sum of values specifying the number and type of buttons to display, the icon style to use, and the identity of the default button. If omitted, the default value for buttons is 0.

Constant Description
0 Display OK button only.
1 Display OK and Cancel buttons.
2 Display Abort, Retry and Ignore buttons.
3 Display Yes, No and Cancel buttons.
4 Display Yes and No buttons.
5 Display Retry and Cancel buttons.
6 Display Cancel, Try Again and Continue buttons.
7 Display Continue and Abort buttons.
16 Displays the error message icon.
32 Displays the query message icon.
48 Displays the warning message icon.
64 Displays the information message icon.
0 The first button is the default.
256 The second button is the default.
512 The third button is the default.
768 The fourth button is the default.

title

Optional. String displayed in the title bar of the dialog box.

Return Values

Value Description
1 OK
2 Cancel
3 Abort
4 Retry
5 Ignore
6 Yes
7 No
10 Try Again
11 Continue

See Also

Salamander Object

From the Sally manual (GPL-2.0-or-later), © 1997-2023 Open Salamander Authors; © 2025-2026 Elias Bachaalany. Source: manual source (zip) · original page in the Sally repository