prompt | (String) Text presented as the message in the window. The maximum length of text is approximately 1024 characters, depending on the width of the characters used. If prompt consists of more than one line, then 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 not set, then the default value is vbOKOnly. vbOKOnly - Display the "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 - 1st button is default
vbDefaultButton2 - 2nd button is default
vbDefaultButton3 - 3rd button is default
vbDefaultButton4 - 4th button is 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) Text string presented in the window title bar.
If not set, then the application name is placed in the window title bar. |
helpfile | [optional] (String) Path to the Help file to use to provide context-sensitive Help for the window. If set, then the context parameter must also be provided. |
context | [optional] (Integer) The Help context number assigned by the Help author to the appropriate Help topic. If set, then the helpfile parameter must also be provided. |
If vbOK = MsgBox("Hello World!", vbOKCancel+vbInformation, "MsgBox Example") Then
' ...
End If