hi,
When I call a msgbox like this
VB Code:
MsgBox "Exit", vbYesNo
how do an if command for yes and no ?
bye
Printable View
hi,
When I call a msgbox like this
VB Code:
MsgBox "Exit", vbYesNo
how do an if command for yes and no ?
bye
orVB Code:
dim intRes as integer intRes = MsgBox("Exit",vbYesNo) if intRes = vbYes then Exit code here end if
VB Code:
if msgbox("Exit",vbYesNo) = vbYes then Exit code here end if
VB Code:
If MsgBox("Exit", vbYesNo) = vbYes Then Else End If 'or Dim mBoxsResult As VbMsgBoxResult mBoxsResult = MsgBox("Exit", vbYesNo) Select Case mBoxsResult Case vbYes Case vbNo End Select
thank you both
If you wanted to put one of the little pictures on the messagebox you could do it like this...
This would but the little question picture on it....theres several available when your typing the code it should show up with the list of available pics.VB Code:
If MsgBox("Would you like to exit?", vbQuestion + vbYesNo) = vbYes Then Unload Me 'They clicked Yes End If