MsgBox用法:
Sub subMsgBox() Dim iok As Byte iok = MsgBox("是否XXX", vbYesNoCancel + vbQuestion, "标题") If iok = vbCancel Then: Exit Sub End Sub
结果: