1/9/11

Input/Output Operations

InputBox Function


Displays a prompt in a dialog box, waits for the user to input text or click a button, and returns the contents of the text box.

Example:

Dim Input

Input = InputBox("Enter your name")

MsgBox ("You entered: " & Input)

MsgBox Function

Displays a message in a dialog box, waits for the user to click a button, and returns a value indicating which button the user clicked.

Example:

Dim MyVar

MyVar = MsgBox ("Hello World!", 65, "MsgBox Example")

MyVar contains either 1 or 2, depending on which button is clicked.