在vb中,设计消息框时,如何编辑是否代码

来源:百度知道 编辑:UC知道 时间:2024/06/20 06:33:39

Dim a As Integer
a = MsgBox("提示信息", vbYesNo)
If a = vbYes Then
'加入代码
ElseIf a = vbNo Then
'加入代码
End If

Dim l As Integer
l = MsgBox("提示信息", vbYesNo)
If l = vbYes Then
MsgBox "您选择了“是”"
ElseIf l = vbNo Then
MsgBox "您选择了“否”"
End If

同上

同上上