4 回答

TA貢獻1805條經驗 獲得超10個贊
MsgBox(prompt[, buttons] [, title] [, helpfile, context])MsgBox 函數的語法具有以下幾個命名參數:
Prompt-------必需的。字符串表達式,作為顯示在對話框中的消息。prompt 的最大長度大約為 1024 個字符,由所用字符的寬度決定。
如果 prompt 的內容超過一行,則可以在每一行之間用回車符 (Chr(13))、換行符 (Chr(10)) 或是回車與換行符的組合 (Chr(13) & Chr(10)) 將各行分隔開來。
Buttons-------可選的。數值表達式是值的總和,指定顯示按鈕的數目及形式,使用的圖標樣式,缺省按鈕是什么以及消息框的強制回應等。如果省略,則 buttons 的缺省值為 0。
Title-------可選的。在對話框標題欄中顯示的字符串表達式。如果省略 title,則將應用程序名放在標題欄中。
Helpfile--------可選的。字符串表達式,識別用來向對話框提供上下文相關幫助的幫助文件。如果提供了 helpfile,則也必須提供 context。
Context-------可選的。數值表達式,由幫助文件的作者指定給適當的幫助主題的幫助上下文編號。如果提供了 context,則也必須提供 helpfile。

TA貢獻2011條經驗 獲得超2個贊
Displays a message in a dialog box, waits for the user to click a button, and
returns a value indicating which button the user clicked.
MsgBox(prompt[, buttons][, title][, helpfile, context])
Arguments
prompt
String expression displayed as the message in the dialog box. The maximum
length of prompt is approximately 1024 characters, depending on the width
of the characters used. If prompt consists of more than one line, you can
separate the lines using a carriage return character (Chr(13)), a
linefeed character (Chr(10)), or carriage return–linefeed
character combination (Chr(13) & Chr(10)) between each
line.
buttons
Numeric expression that is the sum of values specifying the number and type
of buttons to display, the icon style to use, the identity of the default
button, and the modality of the message box. See Settings section for values. If
omitted, the default value for buttons is 0.
title
String expression displayed in the title bar of the dialog box. If you omit
title, the application name is placed in the title bar.
helpfile
String expression that identifies the Help file to use to provide
context-sensitive Help for the dialog box. If helpfile is provided,
context must also be provided. Not available on 16-bit platforms.
context
Numeric expression that identifies the Help context number assigned by the
Help author to the appropriate Help topic. If context is provided,
helpfile must also be provided. Not available on 16-bit platforms.
- 4 回答
- 0 關注
- 949 瀏覽
添加回答
舉報