不打明白你的意思?Private Sub MDIForm_QueryUnload(Cancel As Integer, UnloadMode As Integer) If MsgBox("真的要退出吗?", vbYesNo + vbQuestion + vbDefaultButton2, "请确认") = vbNo Then Cancel = True End SubPrivate Sub mExit_Click() Unload Me End Sub
Private Sub Form_Load() If 1 > 0 Then Unload Me End If End Sub
unload me
end if
If MsgBox("真的要退出吗?", vbYesNo + vbQuestion + vbDefaultButton2, "请确认") = vbNo Then Cancel = True
End SubPrivate Sub mExit_Click()
Unload Me
End Sub
If 1 > 0 Then
Unload Me
End If
End Sub
不用form_load.用form_activate()