Msg Box

The MsgBox function displays information and waits for the user to press a button before continuing. Whereas InputBox only has OK and Cancel buttons, MsgBox allows you to choose from several configurations of buttons, including Yes, No, OK, and Cancel. You can also configure the prompt, title, and help files. The following code is a simple prompt to find out whether the user wishes to continue. A Select Case statement is then used to continue the program with the appropriate action. Figure 9.2 shows the resulting customized message box.

0 0

Post a comment