|
-
Feb 2nd, 2000, 06:17 AM
#1
Can anyone give me an example of code that would use this entire command?
-
Feb 2nd, 2000, 06:20 AM
#2
Addicted Member
I'm not sure what your asking but vbyesnocancel is used with the msgbox function. It gives you a meesage box that contains a yes, no and cancel button.
msgbox "message",vbyesnocancel,"Title"
-
Feb 2nd, 2000, 06:38 AM
#3
I know about the msg part, the part I need to know about is how it works, does it use an IF THEN ELSE statement, or what? Please show an example.
-
Feb 2nd, 2000, 06:42 AM
#4
This is what I have...
Private Sub savefile()
MsgBox "Do you want to Submit another Problem", vbYesNo
If vbYes Then
clearfields
Else
MsgBox "We have been notified. Thank You."
Unload Me
End If
End Sub
This doesn't work...if I click no, it does the same thing as VBYES. What is wrong with this?
-
Feb 2nd, 2000, 06:54 AM
#5
Hyperactive Member
Here I will tell you again but thats ok
dim happy as string
Private Sub savefile()
happy = MsgBox ("Do you want to Submit another Problem", vbYesNo)
If happy = vbYes Then
clearfields
Else
MsgBox "We have been notified. Thank You."
Unload Me
End If
End Sub
Sorry forgot () last time
------------------
Sincerely,
Chris
:-) ;-)
just have fun out there and live life to the fullest while it is still here
Email [email protected]
[This message has been edited by PITBULLCJR (edited 02-02-2000).]
-
Feb 2nd, 2000, 06:57 AM
#6
-
Feb 2nd, 2000, 07:00 AM
#7
So Unbanned
Here:
Code:
Reply = MsgBox("Yes will continue, No will stop, and cancel will do nothing", 3, "Yes, No, and Cancel prompt")
If Reply = 6 Then 'they hit Yes
MsgBox "You hit Yes"
ElseIf Reply = 7 Then 'they hit no
MsgBox "You hit No"
Else
MsgBox "You hit cancel"
End If
Good luck.
------------------
DiGiTaIErRoR
VB, QBasic, Iptscrae, HTML
Quote: There are no stupid questions, just stupid people.
-
Feb 2nd, 2000, 07:43 AM
#8
New Member
the VbYesNo and others are simply consts for integer type
while asking a message box (msgbox) to draw the VbYesNo or what ever command button you wish for, you simply check:
result=msgbox("are you sure",VbYesNo)
if result=VbYes then
'do something
end if
-
Feb 2nd, 2000, 05:10 PM
#9
Conquistador
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
|