Is there a way to know if the a form was closed
using the CLOSE Command on the Control Menu and
not with the UNLOAD statement?
Printable View
Is there a way to know if the a form was closed
using the CLOSE Command on the Control Menu and
not with the UNLOAD statement?
I'm not sure if this is what you mean, but...
Code:Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
If UnloadMode = vbAppTaskManager Then
'Closed with Task Manager
ElseIf UnloadMode = vbFormControlMenu Then
'Closed with control Menu
ElseIf UnloadMode = vbFormCode Then
'Closed with code
ElseIf UnloadMode = vbAppWindows Then
'Windows is closing down
ElseIf UnloadMode = vbFormOwner Then
'Owner window closed it
End If
End Sub
yup bro. this is what i want.
i owe u bro. thanks!
- rod