The Msg Box Function

You're probably already familiar with the VBA MsgBox function — I use it quite a bit in the examples throughout this book. The MsgBox function, which accepts the arguments shown in Table 15-1, is handy for displaying information and getting simple user input.

Here's a simplified version of the syntax for the MsgBox function:

MsgBox(prompt[

, buttons][, title])

Table 15-1

MsgBox Function Arguments

Argument

What It Does

prompt

Supplies the text Excel displays in the message box

buttons

Specifies which buttons appear in the message box (optional)

title

Defines the text that appears in the message box's title bar (optional)

0 0

Post a comment