Ajuda del LibreOffice 24.8
Mostra un quadre de diàleg que conté un missatge.
   MsgBox prompt As String [,buttons = MB_OK [,title As String]]
   response = MsgBox( prompt As String [,buttons = MB_OK [,title As String]])
prompt: String expression displayed as a message in the dialog box. Line breaks can be inserted with Chr$(13).
title: String expression displayed in the title bar of the dialog. If omitted, the title bar displays the name of the respective application.
buttons: Any integer expression that specifies the dialog type, as well as the number and type of buttons to display, and the icon type. buttons represents a combination of bit patterns, that is, a combination of elements can be defined by adding their respective values:
| Constant amb nom | Valor enter | Definició | 
|---|---|---|
| MB_OK | 0 | Mostra només el botó «D'acord». | 
| MB_OKCANCEL | 1 | Mostra els botons «D'acord» i «Cancel·la». | 
| MB_ABORTRETRYIGNORE | 2 | Mostra els botons «Avorta», «Reintenta« i «Ignora». | 
| MB_YESNOCANCEL | 3 | Mostra els botons «Sí», «No» i «Cancel·la». | 
| MB_YESNO | 4 | Mostra els botons «Sí» i «No». | 
| MB_RETRYCANCEL | 5 | Mostra els botons «Reintenta» i «Cancel·la». | 
| MB_ICONSTOP | 16 | Afegeix la icona de «Stop» al diàleg. | 
| MB_ICONQUESTION | 32 | Afegeix la icona de pregunta al diàleg. | 
| MB_ICONEXCLAMATION | 48 | Afegeix la icona d'exclamació al diàleg. | 
| MB_ICONINFORMATION | 64 | Afegeix la icona d'informació al diàleg. | 
| 
 | 128 | Estableix el primer botó del diàleg com a botó per defecte. | 
| MB_DEFBUTTON2 | 256 | Estableix el segon botó del diàleg com a botó per defecte. | 
| MB_DEFBUTTON3 | 512 | Estableix el tercer botó del diàleg com a botó per defecte. | 
Sub ExampleMsgBox
 Const sText1 = "S'ha produït un error inesperat."
 Const sText2 = "No obstant això, l'execució del programa continuarà."
 Const sText3 = "Error"
 MsgBox(sText1 + Chr(13) + sText2,16,sText3)
 MsgBox(sText1 + Chr(13) + sText2, MB_ICONSTOP, sText3)
End Sub