The form QueryUnload event easily gives you something close to that information.
Code:
Private Sub Form_QueryUnload(cancel As Integer, unloadmode As Integer)
Examine the value of unloadmode and compare against the constants listed in MSDN
The constant you want is vbAppWindows and has a value of 2. vbAppwindows is given when the current windows session is ending mwhich could mean a logoff or shutdown. Is that close enough?
Take Care
Matt
If at first you don't succeed, skydiving is not for you.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.