发布网友 发布时间:2024-10-24 11:32
共3个回答
热心网友 时间:2024-10-30 09:33
很简单的, 看代码
Msg = "您确定要退出程序吗?"
Style = vbYesNo + vbCritical + vbDefaultButton2
Title = "提示"
Response = MsgBox(Msg, Style, Title)
If Response = vbYes Then
End
End If
热心网友 时间:2024-10-30 09:29
Dim Msg, Style, Title, Help, Ctxt, Response, MyString
Msg = "您确定要退出程序吗?" ' 定义信息。
Style = vbYesNo ' 定义按钮。
Title = "提示" ' 定义标题。
Ctxt = 1000 ' 定义标题 ' 上下文。
' 显示信息。
Response = MsgBox(Msg, Style, Title, ,, Ctxt)If Response = vbYes Then ' 用户按下“是”。
MyString = "Yes"
Exit Sub
Else ' 用户按下“否”。
MyString = "No" ' 完成某操作。
End If
热心网友 时间:2024-10-30 09:26
Private Sub Command1_Click()
If MsgBox("您确定要退出程序吗?", vbYesNo, "提示") = vbYes Then
Unload Me
End If
End Sub
热心网友 时间:2024-10-30 09:31
很简单的, 看代码
Msg = "您确定要退出程序吗?"
Style = vbYesNo + vbCritical + vbDefaultButton2
Title = "提示"
Response = MsgBox(Msg, Style, Title)
If Response = vbYes Then
End
End If
热心网友 时间:2024-10-30 09:29
Private Sub Command1_Click()
If MsgBox("您确定要退出程序吗?", vbYesNo, "提示") = vbYes Then
Unload Me
End If
End Sub
热心网友 时间:2024-10-30 09:26
Dim Msg, Style, Title, Help, Ctxt, Response, MyString
Msg = "您确定要退出程序吗?" ' 定义信息。
Style = vbYesNo ' 定义按钮。
Title = "提示" ' 定义标题。
Ctxt = 1000 ' 定义标题 ' 上下文。
' 显示信息。
Response = MsgBox(Msg, Style, Title, ,, Ctxt)If Response = vbYes Then ' 用户按下“是”。
MyString = "Yes"
Exit Sub
Else ' 用户按下“否”。
MyString = "No" ' 完成某操作。
End If