Discussion:
Stupid code :o)
(too old to reply)
Eric
2003-10-04 23:59:53 UTC
Permalink
This is stupid, I know but just for learning I am trying to understand how
all this works. I can not get VB to say "Then pick up the darn phone".
What am I doing wrong? Am I way off base or what?

Private Sub CmdVBOk_Click()
intpress = MsgBox("Are you there", vbYesNo)
If intpress = 1 Then
rem if intpress = yes then
MsgBox "Then pick up the darn phone"
Else
MsgBox "Ok Call ya later"
End If
End Sub

Thank you
Eric
Dr Hangman
2003-10-05 01:12:08 UTC
Permalink
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

I cheated, I added this line under the assigning of intpress...
MsgBox intpress

It shows that when you press yes, you get 6 and when you press 7 you get
no...

Dr Hangman
Post by Eric
This is stupid, I know but just for learning I am trying to understand how
all this works. I can not get VB to say "Then pick up the darn phone".
What am I doing wrong? Am I way off base or what?
Private Sub CmdVBOk_Click()
intpress = MsgBox("Are you there", vbYesNo)
If intpress = 1 Then
rem if intpress = yes then
MsgBox "Then pick up the darn phone"
Else
MsgBox "Ok Call ya later"
End If
End Sub
Thank you
Eric
Continue reading on narkive:
Loading...