MsgBox Function/text/sbasic/shared/03010102.xhpMsgBox functionMsgBox FunctionDisplays a dialog box containing a message and returns a value.Syntax:MsgBox (Text As String [,Type As Integer [,Dialogtitle As String]])Return value:IntegerParameter:Text: String expression displayed as a message in the dialog box. Line breaks can be inserted with Chr$(13).DialogTitle: String expression displayed in the title bar of the dialog. If omitted, the name of the respective application is displayed.Type: Any integer expression that specifies the dialog type and defines the number and type of buttons or icons displayed. Type represents a combination of bit patterns (dialog elements defined by adding the respective values):Values
Named constantInteger valueDefinitionMB_OK0Display OK button only.MB_OKCANCEL1Display OK and Cancel buttons.MB_ABORTRETRYCANCEL2Display Abort, Retry, and Ignore buttons.MB_YESNOCANCEL3Display Yes, No, and Cancel buttons.MB_YESNO4Display Yes and No buttons.MB_RETRYCANCEL5Display Retry and Cancel buttons.MB_ICONSTOP16Add the Stop icon to the dialog.MB_ICONQUESTION32Add the Question icon to the dialog.MB_ICONEXCLAMATION48Add the Exclamation Point icon to the dialog.MB_ICONINFORMATION64Add the Information icon to the dialog.128First button in the dialog as default button.MB_DEFBUTTON2256Second button in the dialog as default button.MB_DEFBUTTON3512Third button in the dialog as default button.
Return value:
Named constantInteger valueDefinitionIDOK1 OKIDCANCEL2 CancelIDABORT3 AbortIDRETRY4 RetryIDIGNORE5 IgnoreIDYES6 YesIDNO7 No