MsgBox - function of language VBScript

Displays a message in a window, waits for the user to click a button.

For the purposes of PROMOTIC system, it is more usefull to use the method: Pm.MessageBox.

MsgBox(prompt As String, [buttons As Integer], [title As String], [helpfile As String], [context As Integer]) As String
s = MsgBox(prompt[, buttons][, title][, helpfile, context])
prompt(String) String expression presented as the message in the window. The maximum length of prompt is approximately 1024 characters, depending on the width of the characters used. If prompt consists of more than one line, you can separate the lines using the vbCr, vbLf or vbCrLf constants between each line.
buttons[optional] (Integer) Numeric expression that is the sum of values specifying the number and type of buttons to show, the icon style to use, the identity of the default button, and the modality of the message box. If omitted, the default value for buttons is vbOKOnly.
vbOKOnly - Display OK button only
vbOKCancel - Display OK and Cancel buttons
vbAbortRetryIgnore - Display ABORT, RETRY and IGNORE buttons
vbYesNoCancel - Display YES, NO and Cancel buttons
vbYesNo - Display YES and NO buttons
vbRetryCancel - Display RETRY and Cancel buttons
vbCritical - Display "Critical Message" icon
vbQuestion - Display "Warning Query" icon
vbExclamation - Display "Warning Message" icon
vbInformation - Display "Warning Message" icon
vbDefaultButton1 - 1.button is the default
vbDefaultButton2 - 2.button is the default
vbDefaultButton3 - 3.button is the default
vbDefaultButton4 - 4.button is the default
vbApplicationModal - Application modal mode. The user must respond to the message box before continuing work in the current application.
vbSystemModal - System modal mode. All applications are suspended until the user responds to the message box.
title[optional] (String) String expression presented in the title bar of the window. If you omit title, the application name is placed in the title bar.
helpfile[optional] (String) String expression that identifies the Help file to use to provide context-sensitive Help for the window. If helpfile is provided, context parameter must also be provided.
context[optional] (Integer) Numeric expression that identifies the Help context number assigned by the Help author to the appropriate Help topic. If context is provided, helpfile parameter must also be provided.
Return Values:
Returns a value indicating which button the user clicked. The values corresponds to following constants:
vbOK - OK button was clicked
vbCancel - Cancel button was clicked
vbAbort - ABORT button was clicked.
vbRetry - RETRY button was clicked.
vbIgnore - IGNORE button was clicked.
vbYes - YES button was clicked.
vbNo - NO button was clicked.

When both helpfile and context are provided, the user can press F1 to view the Help topic corresponding to the context.

If the window shows a Cancel button, pressing the Esc key has the same effect as clicking Cancel.

The following example displays an information window with OK and Cancel buttons. The function returns the value of vbOK or vbCancel based on the key pressed.
If vbOK = MsgBox("Hello World!", vbOKCancel+vbInformation, "MsgBox Example") Then ...
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice