A message box is special type of Visual Basic window in which you can display a message to the user. You can display message, an optional icon, a title bar caption, and command buttons in a message box.
You may want to display a message when the user has entered some invalid data or neglected to enter some required data value.
Message box constant:
vbQuestion : This constant sets a Question marked icon for the message box. It can be used as follows: MsgBox “Lets this be warning”, vbQuestion, “Error”
vbOkOnly: This constant makes message box to appear with only one ok button. Example: MsgBox “Welcome”, vbOkOnly “ Greeting”.
vbInformation: Shows information icon on the message box. Example: MsgBox “Welcome”, vbInformation “ Greeting”.