It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming Visual Basic Forum Script-archive

pop up a box if the x button is clicked

Share your completed scripts.

Moderator: dafunkymunky

pop up a box if the x button is clicked

Postby chubzyko on Wed Aug 27, 2008 5:46 pm

Code: Select all
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)

    ' Only prompt if the user hits X
    If UnloadMode = 0 Then
        If Msgbox("Are you sure you want to quit?", vbYesNo Or vbQuestion) = vbNo Then Cancel = True
    End If

End Sub
"Failure is the key to success, so try and try until you succeed."
User avatar
chubzyko
100+ Club
 
Posts: 104
Joined: Wed Jul 30, 2008 10:48 pm
Location: Marikina City, Philippines

Who is online

Users browsing this forum: No registered users and 0 guests