|
-
Jul 17th, 2000, 10:03 PM
#1
Thread Starter
Addicted Member
Ok I've made this work before but can't get it to do it this time. When the user hits X on the form the user is aske if he/she wants to save changes yes and no work fine but the form still unloads if you hit cancel...
code:
Private Sub Form_Unload(Cancel As Integer)
If NoteDirty Then
Dim z
z = MsgBox("Would you like to save changes?", vbYesNoCancel, "Save changes?")
If z = 6 Then
mnuFileSave_Click
ElseIf z = 2 Then
Exit Sub
Else
'oh well
End If
End If
End Sub
Its a replacement for notepad since mine is screwed for some reason....
Thankz
Magiaus
Visual Basic 6.0 SP5
Visual C++ 6.0 SP5
The only sovereign you can allow to rule you is reason.
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
|