是否可以同时将 VBA MsgBox 类型为 vbYesNo 和 vbExclamation?

Is it possible to have VBA MsgBox as type vbYesNo and vbExclamation simultaneously?

我正在尝试让 vba 中的消息框显示为常规的是否框:

但是还有感叹号图标:

我可以通过 vba 轻松完成。喜欢下面的vbExclamation版本代码:

MsgBox "Are you sure you want to continue?", vbExclamation, "Warning!"

或 vbYesNo 的版本:

Dim msgboxResult As VbMsgBoxResult
msgboxResult = MsgBox("Are you sure you want to continue?", vbYesNo, "Warning!")
If msgboxResult = vbNo Then Exit Sub

但不确定两者是否可以结合?

在 MsgBox 函数的 MSDN vba 参考中,https://msdn.microsoft.com/en-us/library/aa445082(v=vs.60).aspx 它确实在最底部说了以下内容:

"Note: To specify more than the first named argument, you must use MsgBox in an expression. To omit some positional arguments, you must include the corresponding comma delimiter."

这是指我需要的吗,如果是,请问我该如何实现?

我觉得

msgboxResult = MsgBox("Are you sure you want to continue?", vbExclamation + vbYesNo, "Warning!")

会按照你想要的方式去做。