This Site generates Code for the MsgBox
function used in VBScript and VBA,
or for the MessageBox(A/W)
API functions.
You can hover over most titles to get some help.
Note that this application will not stop you from making invalid choices,
for example selecting default button 3 when only one button is present.
This Windows API call is fairly tolerant towards invalid combinations.
To decode a message box option number, click here
Options marked with an Asterisk are not mentioned in the MsgBox
documentation.
They are listed because the underlying API call to MessageBox(A/W)
documents them,
which makes them valid choices.
MsgBox "Body",0,"Title"
Save this to a file with extension .vbs
or paste it into a VBA macro.
MessageBox(hWnd,"Body","Title",0);
Replace hWnd
with your current window handle,
or use NULL
if no window is present.
Users can close the dialog using the ESC key if either a "Cancel" button is present, or the dialog contains only an "OK" button. The returned value from the dialog function is the respective button code.