引用 :http://zhidao.baidu.com/question/73897568.html
Private Sub Form_Unload(Cancel As Integer) If MsgBox("是否退出?", vbYesNo) = vbNo Then Cancel = 1 End Sub