窗體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
點退出時彈確認框,點取消就不關~