mrcool4444
asked on
MsgBox
How do I get responses from MsgBoxes? What is the form for getting MsgBoxes responces? And how do I make Elses with message boxes? The way I am trying to do it is like this:
MsgBox "Text", VbYesNo
If VbYes, Then
Unload Me
Else: form1.BackColor = VbGreen
End If
How can I make this code work? Thanx.
MsgBox "Text", VbYesNo
If VbYes, Then
Unload Me
Else: form1.BackColor = VbGreen
End If
How can I make this code work? Thanx.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You can Dim Response as VbMsgBoxResult :
Dim Response as VbMsgBoxResult
Dim Response as VbMsgBoxResult
If you want to design your own input/msg box just create a new form with the desired controls etc. And pass the desired results back to the calling function with some local access functions, just like in an ActiveX control.
REsponse = MsgBox("Text", VBYEsNO + vbQuestion)