MsgBox(Prompt, MsgBoxStyle, Title)的某些参数和返回值说明

消息或信息对话框函数MsgBox(Prompt, MsgBoxStyle, Title)的某些参数和返回值说明
一、可用按钮(指定消息框显示哪些按钮)
MsgBoxStyle.OkOnly = vbOKOnly = 0(确定按钮)
MsgBoxStyle.OkCancel = vbOKCancel = 1(确定、取消按钮)
MsgBoxStyle.AbortRetryIgnore = vbAbortRetryIgnore = 2(终止、重试、忽略按钮)
MsgBoxStyle.YesNoCancel = vbYesNoCancel = 3(是、否、取消按钮)
MsgBoxStyle.YesNo = vbYesNo = 4(是、否按钮)
MsgBoxStyle.RetryCancel = vbRetryCancel = 5(重试、取消按钮)
二、可用图标(指定消息框显示哪种图标)
MsgBoxStyle.Critical = vbCritical = 16(错误图标)
MsgBoxStyle.Question = vbQuestion = 32(问号图标)
MsgBoxStyle.Exclamation = vbExclamation = 48(警号图标)
MsgBoxStyle.Information = vbInformation = 64(信息图标)
三、默认按钮(指定消息框的默认按钮)
MsgBoxStyle.DefaultButton1 = vbDefaultButton1 = 0(指定第1个按钮为默认按钮)
MsgBoxStyle.DefaultButton2 = vbDefaultButton2 = 256(指定第2个按钮为默认按钮)
MsgBoxStyle.DefaultButton3 = vbDefaultButton3 = 512(指定第3个按钮为默认按钮)
四、函数返回值MsgBoxResult(指明用户所选择的按钮)
MsgBoxResult.Ok = DialogResult.OK = vbOK = 1(确定按钮)
MsgBoxResult.Cancel = DialogResult.Cancel = vbCancel = 2(取消按钮)
MsgBoxResult.Abort = DialogResult.Abort = vbAbort = 3(放弃按钮)
MsgBoxResult.Retry = DialogResult.Retry = vbRetry = 4(重试按钮)
MsgBoxResult.Ignore = DialogResult.Ignore = vbIgnore = 5(忽略按钮)
MsgBoxResult.Yes = DialogResult.Yes = vbYes=6(是按钮)MsgBoxResult.No = DialogResult.No = vbNo=7(否按钮)
  • 0
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值