LibreOffice 24.8 帮助
显示一个含有消息的对话框,并返回一个值。
MsgBox (Prompt As String [,Buttons = MB_OK [,Title As String]]) As Integer
整数
| 已命名常量 | 整数值 | 定义 | 
|---|---|---|
| IDOK | 1 | 确定 | 
| IDCANCEL | 2 | 取消 | 
| IDABORT | 3 | 中止 | 
| IDRETRY | 4 | 重试 | 
| IDIGNORE | 5 | 忽略 | 
| IDYES | 6 | 是 | 
| IDNO | 7 | 否 | 
Sub ExampleMsgBox
Dim sVar As Integer
 sVar = MsgBox("Las Vegas")
 sVar = MsgBox("Las Vegas",1)
 sVar = MsgBox( "Las Vegas",256 + 16 + 2,"Dialog title")
 sVar = MsgBox("Las Vegas", MB_DEFBUTTON2 + MB_ICONSTOP + MB_ABORTRETRYIGNORE, "Dialog title")
End Sub