|
-
October 19th, 1999, 10:21 AM
#1
How to chatch "exit" button?
Hi all,
Please let me know how to catch the "exit" (x button in the top-right corner) so that I can ask whether or not user wants to quit.
Thank you.
-
October 19th, 1999, 11:11 AM
#2
Re: How to chatch "exit" button?
In the form's query unload event:
if UnloadMode <> vbFormCode the
'Ask the user.
'if the user responds that he doesn't want to quit:
Cancel = true
end if
-
October 19th, 1999, 11:12 AM
#3
Re: How to chatch "exit" button?
Write the folloing code on form unload event :
private Sub Form_Unload(Cancel as Integer)
Dim iChoice as Integer
iChoice = MsgBox("Are you sure ? ", vbYesNo, "Exit")
If iChoice = vbNo then
Cancel = true
End If
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|