Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
If MsgBox("你真的想退出吗? ", vbYesNo + vbDefaultButton1, "退出提示 ") = vbYes Then
End
Else
Cancel = True
End If
End Sub
Dim a As Integer
a = MsgBox("你确认退出?", vbYesNo, "标题")
If a = 6 Then form1.close