to thetypeparameter, you get a nice list box showing all your options. Four icons can be
used, depending on circumstances, as shown in the following table:
Constant Definition
vbCritical Stop. A white cross on a red circular background. Use this to tell users they are
attempting to do something they should not.
vbExclamation Exclamation mark. Use this as a warning, for example, “This may lead to loss of
data.”
vbInformation Information sign. Use this to indicate that the message box is supplying
information that the user may find useful at this point in the program.
vbQuestion Question mark. Usually associated with multiple buttons, for example, “Are you
sure you wish to take this action: Yes or No?”
This is all quite straightforward, but what happens if you want to add more or different
buttons, such as Yes and No? Microsoft has built in a number of constants to allow for
different button combinations and icons. These are detailed in Table 5-8.
Chapter 5: Strings, Functions, and Message Boxes 67
Figure 5-1 A simple message box