|
-
Jun 27th, 2001, 10:40 AM
#1
msgbox question
this code won't end the program, it just sends me back to my form, i want it to end the program, what am i doing wrong....
Private Sub cmdcancel_Click()
Dim intresponse As Integer
MsgBox "Are you sure you want to quit the program?", vbYesNo, "You Actually Want to Quit?"
If intresponse = vbYes Then
End
End If
End Sub
-
Jun 27th, 2001, 10:44 AM
#2
Lively Member
msgbox
heres how u can do it:
Private Sub cmdcancel_Click()
q = Msgbox ("Are you sure you want to quit the program?", vbYesNo, "You Actually Want to Quit?")
if q = vbYes then
end
else
end if
end sub
hope that works..
..if it doesn't post bac and ill look it up. this is all of the top of my head...
hope i helped,
pegasus
Those who say that size doesn't matter, aren't big enough to admit that they're wrong.
Sex is like a bank account: once you withdraw, you lose interest.
______________________________
Code:
|^^^^^|
\-Ó-Ò-/
| |_| |
\\_//
__ | |__
/| \___/ |\
/ | | \
/ | Faisal \ \
| / Karjikar | |
\ _\___________|_/
\ /
| \/ |
| || |
|____||___|
\ _ / \ _ /
/|_|\ /|_|\
______ |___| |___| ____
/_/\/\/\/\/\/\/\/\/\/\/\/\/\//\
_\/\/\/\/\/\/\/\/\/\/\/\/\/\//\
/\/\/\/\/\/\/\//\/\/\/\/\/\//\\/\/
^
Its meant to be the ocean... :D
-
Jun 27th, 2001, 10:44 AM
#3
teehee, you never assigned the result of the msgbox to the variable 
VB Code:
If (MsgBox("You wanna quit, huh?", vbYesNo) = vbYes) Then
End
End If
works nicer i think
-
Jun 27th, 2001, 10:46 AM
#4
Lively Member
Private Sub Command1_Click()
intresponse = MsgBox("Are you sure you want to quit the program?", vbYesNo, "You Actually Want to Quit?")
If intresponse = vbYes Then
End
End If
End Sub
-
Jun 27th, 2001, 10:50 AM
#5
duh
assigning the variable would help
must have had a brain freeze: rolleyes:
thanks everybody
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
|