窗体unload事件加个提示:
Private Sub Form_Unload(Cancel As Integer)
Dim xxxx As Integer
xxxx = MsgBox(确定要退出吗?, vbOKCancel + vbInformation, 关闭)
If xxxx = vbCancel Then Cancel = True
End If
End Sub
点退出时弹确认框,点取消就不关~
Private Sub Form_Unload(Cancel As Integer)
Dim xxxx As Integer
xxxx = MsgBox(确定要退出吗?, vbOKCancel + vbInformation, 关闭)
If xxxx = vbCancel Then Cancel = True
End If
End Sub
点退出时弹确认框,点取消就不关~