...出现msgbox"您确定要退出程序吗?", vbYesNo + vbDefaultButton...

发布网友 发布时间: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

声明声明:本网页内容为用户发布,旨在传播知识,不代表本网认同其观点,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。E-MAIL:11247931@qq.com