为了账号安全,请及时绑定邮箱和手机立即绑定

VBA编程中MsgBox函数怎么用?

VBA编程中MsgBox函数怎么用?

C# Go
慕村9548890 2019-05-16 15:11:18
VBA编程中MsgBox函数怎么用
查看完整描述

4 回答

?
holdtom

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。

查看完整回答
反对 回复 2019-05-25
?
森林海

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.



查看完整回答
反对 回复 2019-05-25
  • 4 回答
  • 0 关注
  • 863 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信