How do i set value to thse so that not matter which one is clikc, they end the program?
Printable View
How do i set value to thse so that not matter which one is clikc, they end the program?
a = msgbox("are you sure you want to end the program?",vbyesno)
'no checking for it
unload me
But see herer is wher ei'm tyring to intergrate:
Code:If feild.Quanity < quanty Then MsgBox " Hey now, check that quantity", vbOKOnly
End If
Only if that circumstace is true, should it end.. and now i switched it to vb ok only.
change it to:
If feild.Quanity < quanty Then MsgBox " Hey now, check that quantity", vbOKOnly : Unload Me
thanks buddy.
btw you spelled 'feild' wrong. it is spelled 'field'.
you could do this
VB Code:
a= MsgBox("Exit?",vbYesNo) If a = vbYes or vbNo Then Unload Me End End If
hey blinky think about what you just said.
If a = vbYes or vbNo Then
Unload Me
End
End If
when there are only 2 options, yes or no. why dont just remove that and use
Unload me
If you read the original question:
He wants to have something that operates on clicking Yes Or No so i incorporated that into my response so that he can see how to do it that way. I would do it your way, and in fact do regularly when i do this sort of thing, but the question was put and while just ignoring the response options for this specific case works fine, it doesn't show him how to do one action on multiple click options in the future. So i wrote my code to show how to do that.Quote:
How do i set value to thse so that not matter which one is clikc, they end the program?
Hope i have explained myself.
Good coding.