DIAdem Help

MsgBox Constants

  • Updated2024-09-12
  • 1 minute(s) read

MsgBox Constants

These constants are integrated in VBS and need not be defined before use. Use these constants anywhere in your script to represent the displayed values.

The following constants specify which buttons and symbols are in the message box.

ConstantValueDescription
vbOKOnly0Displays the OK button
vbOKCancel1Displays the OK button and the Cancel button
vbAbortRetryIgnore2Displays the Abort button, the Retry button, and the Ignore button
vbYesNoCancel3Displays the Yes button, the No button, and the Cancel button
vbYesNo4Displays the Yes button and the No button
vbRetryCancel5Displays the Retry button and the Cancel button
vbCritical16Displays the Stop symbol
vbQuestion32Displays the Question Mark symbol
vbExclamation48Displays the Warning symbol
vbInformation64Displays the Information symbol
vbDefaultButton10The first button is the default button
vbDefaultButton2256The second button is the default button
vbDefaultButton3512The third button is the default button
vbDefaultButton4768The fourth button is the default button
vbApplicationModal0Application modal
vbSystemModal4096System modal
vbMsgBoxHelpButton16384Displays the Help button
vbMsgBoxRight52488Right-aligned message box
VbMsgBoxSetForeground65536Displays the message in the foreground
vbMsgBoxRtlReading1048576The writing direction of the message box is from right to left

The following constants specify which button the user clicked to close the message box.

ConstantValueDescription
vbOK1Clicked OK.
vbCancel2Click Cancel
vbAbort3Click Cancel
vbRetry4Click Retry
vbIgnore5Click Ignore
vbYes6Click Yes
vbNo7Click No