Msgbox() Function

MsgBox(Prompt, [Buttons as VbMsgBoxStyle], [Title], [HelpFile], [Context]))

Creates a message box that provides status information or handle simple yes/no inputs.

Example:

' declare as integer to store the result as a number.
Dim myAnswer as Integer
Msgbox "Hello World!", vbExclamation ' Displays with an OK button with the Exclimation icon
myAnswer = Msgbox("Are you sure?", vbOKCancel + vbQuestion) ' Displays with an OK and Cancel button with the Questionmark icon
myAnswer = Msgbox("Do you want to dance?", vbYesNo + vbQuestion + vbDefaultButton2) ' Displays with an Yes and No button with the Questionmark icon, and the 2nd button (the No button) is default.

For the [VbMsgBoxStyle] argument, you may combine different options from the groups below to style the messagebox.

VbMsgBoxStyle: First Group: Determines which buttons to display
ConstantValueDescription
vbOkOnly0Display OK button only.
vbOkCancel1Display OK and Cancel buttons.
vbAbortRetryIgnore2Display Abort, Retry, and Ignore buttons.
vbYesNoCancel3Display Yes, No, and Cancel buttons.
vbYesNo4Display Yes and No buttons.
vbRetryCancel5Display Retry and Cancel buttons.

VbMsgBoxStyle: Second Group: Determines which icon to display
ConstantValueDescription
vbCritical16Display Critical Message icon.
vbQuestion32Display Warning Query (question mark) icon.
vbExclamation48Display Warning Message icon.
vbInformation64Display Information Message icon.

VbMsgBoxStyle: Third Group: Determines which button is default
ConstantValueDescription
vbDefaultButton10First button is default.
vbDefaultButton2256Second button is default.
vbDefaultButton3512Third button is default.
vbDefaultButton41024Third button is default.

VbMsgBoxStyle: Fourth Group: Determines the modality of the message box.
ConstantValueDescription
vbApplicationModal0Application modal; the user must respond to the message box before continuing.
vbSystemModal4096System modal; all applications are suspended until the user responds to the message box.

VbMsgBoxStyle: Fifth Group: Misc Options.
ConstantValueDescription
vbMsgBoxHelpButton16384Adds Help button to the message box.
vbMsgBoxSetForeground65536Specifies the message box window as the foreground window.
vbMsgBoxRight524288Text is right aligned.
vbMsgBoxRtlReading1048576Specifies text should appear as right-to-left reading on Hebrew or Arabic systems.

Msgbox Creator

This msgbox creator only works in browsers that supports VBScript (This would be any flavor of IE)

Message Box Creator

Message:

Title:

Please select an icon

Please select a button

Original Source for msgbox creator was found at:
http://www.javascriptsource.com/text-effects/vb-message-box-creator.html