窗體unload事件加個(gè)提示:
Private Sub Form_Unload(Cancel As Integer)
Dim xxxx As Integer
xxxx = MsgBox(確定要退出嗎?, vbOKCancel + vbInformation, 關(guān)閉)
If xxxx = vbCancel Then Cancel = True
End If
End Sub
點(diǎn)退出時(shí)彈確認(rèn)框,點(diǎn)取消就不關(guān)~
Private Sub Form_Unload(Cancel As Integer)
Dim xxxx As Integer
xxxx = MsgBox(確定要退出嗎?, vbOKCancel + vbInformation, 關(guān)閉)
If xxxx = vbCancel Then Cancel = True
End If
End Sub
點(diǎn)退出時(shí)彈確認(rèn)框,點(diǎn)取消就不關(guān)~