Question[Solved]MSG BOX help

Posts 1–6 of 6 · Page 1 of 1
[Solved]MSG BOX help
Hey guys, what is the code for a message box to have another button like a continue and close button? the standard msgbox just has an ok button. how do add my own/or change the properties of it?
msgbox ("hi")
MessageBox

If you scroll down you'll see the other button types. E.g. abort,cancel,continue etc.

MessageBox's return value is one of the button ID's if it's successful. I guess you can use if statements from there.

if IDABORT do this

if IDCONTINUE do this..

Sorry I don't know any VB but I thought this might help.
Code:
If MsgBox("Heya Heya Heya This works " , vbOKCancel) = vbOk Then
    yad yada
Else
    yada yada
End If
Code:
Dim MsgResponse As Variant

MsgResponse = MsgBox("Yada Yada Yada", vbOKCancel) 

If MsgResponse = vbOk Then
    Yada Yada
Else ' means cancel
    Yada yada 
    Exit Sub
End If
Sweet thanks Gen. you rock once again
Not a problem, and your welcome
Posts 1–6 of 6 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us