Visual Basic provides to ways of displaying message boxes and input dialog boxes: using Msg Box () and Input Box (). Whose syntaxes are as follows.


Msg Box () is used to display a message to the user and get a return value corresponding to one of the buttons in the message box. Here’s the syntax.

Msg BOX (prompt [, buttons] [,title] [,help file, content]:)

Prompt: argument holds the string displayed as the message in the dialog box. (the maximum length of prompt is approximately 1,024 characters).

Buttons: argument specifies which are he buttons will display in the message box.

Title: parameter holds the string displayed in the title bar of the dialog box.

Help file: argument is a string that identifies the help file to use to provide context-sensitive help for the dialog box.

Context: argument is the help context number assigned to the propriate help topic.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s