LibreOfficeDev 25.8 laguntza
Mezu bat duen elkarrizketa-koadroa bistaratzen du eta balio bat ematen du.
MsgBox (Prompt As String [,Buttons = MB_OK [,Title As String]]) As Integer
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:
| Izendatutako konstantea | Balio osoa | Definizioa | 
|---|---|---|
| MB_OK | 0 | Bistaratu 'Ados' botoia soilik. | 
| MB_OKCANCEL | 1 | Bistaratu 'Ados' eta 'Utzi' botoiak. | 
| MB_ABORTRETRYIGNORE | 2 | Bistaratu 'Abortatu', 'Saiatu berriro' eta 'Ez ikusi' botoiak. | 
| MB_YESNOCANCEL | 3 | Bistaratu 'Bai', 'Ez' eta 'Utzi' botoiak. | 
| MB_YESNO | 4 | Bistaratu 'Bai' eta 'Ez' botoiak. | 
| MB_RETRYCANCEL | 5 | Bistaratu 'Saiatu berriro' eta 'Utzi' botoiak. | 
| MB_ICONSTOP | 16 | Gehitu 'Gelditu' ikonoa elkarrizketa-koadroari. | 
| MB_ICONQUESTION | 32 | Gehitu 'Galdera' ikonoa elkarrizketa-koadroari. | 
| MB_ICONEXCLAMATION | 48 | Gehitu 'Harridura-puntua' ikonoa elkarrizketa-koadroari. | 
| MB_ICONINFORMATION | 64 | Gehitu 'Informazioa' ikonoa elkarrizketa-koadroari. | 
| 
 | 128 | Elkarrizketa-koadroko lehen botoia botoi lehenetsi gisa. | 
| MB_DEFBUTTON2 | 256 | Elkarrizketa-koadroko bigarren botoia botoi lehenetsi gisa. | 
| MB_DEFBUTTON3 | 512 | Elkarrizketa-koadroko hirugarren botoia botoi lehenetsi gisa. | 
Osoko zenbakia
| Izendun konstantea | Balio osoa | Definizioa | 
|---|---|---|
| IDOK | 1 | Ados | 
| IDCANCEL | 2 | Utzi | 
| IDABORT | 3 | Abortatu | 
| IDRETRY | 4 | Saiatu berriro | 
| IDIGNORE | 5 | Ez ikusi | 
| IDYES | 6 | Bai | 
| IDNO | 7 | Ez | 
Sub ExampleMsgBox
Dim sVar As Integer
 sAlda = MsgBox("Las Vegas")
 sAlda = MsgBox("Las Vegas",1)
 sAlda = MsgBox( "Las Vegas",256 + 16 + 2,"Elkarrizketa-koadroaren titulua")
 sVar = MsgBox("Las Vegas", MB_DEFBUTTON2 + MB_ICONSTOP + MB_ABORTRETRYIGNORE, "Elkarrizketa-koadroaren izenburua")
End Sub