点击下载此附件学习
效果图:
源 码:
Private Sub Form_Unload(Cancel As Integer) If MsgBox("Are you sure that you want to close this form?", vbYesNo) = vbYes Then Exit Sub Else Cancel = True End If End Sub