Can someone tell me what I need to do, to do the following.
Have an msgbox with the option of "yes" or "no" than test for which button they pressed.
Thank You
Ken Devorak
Printable View
Can someone tell me what I need to do, to do the following.
Have an msgbox with the option of "yes" or "no" than test for which button they pressed.
Thank You
Ken Devorak
There are a lot of options, look up MSDN.
Code:Dim iResult As Integer
iResult = MsgBox("Hello", vbYesNo)
If iResult = vbYes Then
'something
Else
'something else
End If
put a button on a form and use this code
good luckCode:Private Sub Command1_Click()
If MsgBox("test", vbYesNo) = vbYes Then
MsgBox "user pressed Yes"
Else
MsgBox "user pressed No"
End If
End Sub
Well done Iain17, you beat me with a click :D
[Edited by onerrorgoto on 05-16-2000 at 10:14 AM]