Discussion:
Dr. Hangman -- Stupid code
(too old to reply)
Eric
2003-10-05 02:26:34 UTC
Permalink
Why did you put the number 6 in? what does 6 do?

Private Sub CmdVBOk_Click()
intpress = MsgBox("Are you there", vbYesNo)
If intpress = 6 Then
MsgBox "Then pick up the darn phone"
Else
MsgBox "Ok Call ya later"
End If
End Sub
Dr Hangman
2003-10-05 02:45:37 UTC
Permalink
When I used a MsgBox with vbYesNo, yes gives a response of 6 and no gives a
response of 7
Post by Eric
Why did you put the number 6 in? what does 6 do?
Private Sub CmdVBOk_Click()
intpress = MsgBox("Are you there", vbYesNo)
If intpress = 6 Then
MsgBox "Then pick up the darn phone"
Else
MsgBox "Ok Call ya later"
End If
End Sub
the Wiz
2003-10-05 18:30:47 UTC
Permalink
Post by Eric
Why did you put the number 6 in? what does 6 do?
Private Sub CmdVBOk_Click()
intpress = MsgBox("Are you there", vbYesNo)
If intpress = 6 Then
MsgBox "Then pick up the darn phone"
Else
MsgBox "Ok Call ya later"
End If
End Sub
From VB Help on msgbox:

Return Values

Constant Value
vbOK 1
vbCancel 2
vbAbort 3
vbRetry 4
vbIgnore 5
vbYes 6
vbNo 7


More about me: http://www.jecarter.com/
VB3/VB6/NSBasic Palm/C/PowerBasic source code: http://www.jecarter.com/programs.html
Drivers for Pablo graphics tablet and JamCam cameras: http://home.earthlink.net/~mwbt/
johnecarter ***@at mindspring dot.dot com. Fix the obvious to reply by email.
Loading...