Inserta este codigo en el form:
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
Select Case UnloadMode
Case vbFormCode:
'MsgBox "Opcion Cancelar"
Case vbAppTaskManager:
'MsgBox "Case 2"
Case vbAppWindows:
'MsgBox "case 3"
Case Else
Beep
Cancel = True
End Select
End Sub