LibreOffice 25.8 Yardım
İleti içeren bir iletişim kutusu görüntüler ve bir değer döndürür.
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:
| İsimlendirilmiş sabit | Tam sayı değeri | Tanımlama | 
|---|---|---|
| MB_OK | 0 | Sadece Tamam düğmesini görüntüle. | 
| MB_OKCANCEL | 1 | Tamam ve İptal düğmelerini görüntüle. | 
| MB_ABORTRETRYIGNORE | 2 | İptal, Yeniden Dene ve Yoksay düğmelerini görüntüle. | 
| MB_YESNOCANCEL | 3 | Evet, Hayır ve İptal düğmelerini görüntüle. | 
| MB_YESNO | 4 | Evet ve Hayır düğmelerini görüntüle. | 
| MB_RETRYCANCEL | 5 | Yeniden Dene ve İptal düğmelerini görüntüle. | 
| MB_ICONSTOP | 16 | İletişim kutusuna Durdur simgesini ekle. | 
| MB_ICONQUESTION | 32 | İletişim kutusuna Soru simgesini ekle. | 
| MB_ICONEXCLAMATION | 48 | İletişim kutusuna Ünlem simgesini ekle. | 
| MB_ICONINFORMATION | 64 | İletişim kutusuna Bilgi simgesini ekle. | 
| 
 | 128 | Varsayılan düğme olarak iletişim kutusundaki ilk düğme. | 
| MB_DEFBUTTON2 | 256 | Varsayılan düğme olarak iletişim kutusundaki ikinci düğme. | 
| MB_DEFBUTTON3 | 512 | Varsayılan düğme olarak iletişim kutusundaki üçüncü düğme. | 
Tamsayı
| İsimlendirilmiş sabit | Tam sayı değeri | Tanımlama | 
|---|---|---|
| IDOK | 1 | Tamam | 
| IDCANCEL | 2 | İptal | 
| IDABORT | 3 | Durdur | 
| IDRETRY | 4 | Yeniden Dene | 
| IDIGNORE | 5 | Yoksay | 
| IDYES | 6 | Evet | 
| IDNO | 7 | Hayır | 
Sub ExampleMsgBox
Dim sVar As Integer
 sVar = MsgBox("Bodrum")
 sVar = MsgBox("Bodrum",1)
 sVar = MsgBox( "Bodrum",256 + 16 + 2,"Pencere Başlığı")
 sVar = MsgBox("Las Vegas", MB_DEFBUTTON2 + MB_ICONSTOP + MB_ABORTRETRYIGNORE, "Dialog title")
End Sub