InputBox Method

The InputBox method displays a prompt in a dialog box, waits for the user to input text or click a button, and returns a string containing the contents of the text box.

Syntax

InputBox(prompt, [title], [default])

Parameters

prompt

Required. String displayed as the message in the dialog box.

title

Optional. String displayed in the title bar of the dialog box.

default

Optional. String expression displayed in the text box as the default response if no other input is provided. If you omit default, the text box is displayed empty.

Return Values

If the user clicks OK or presses ENTER, the InputBox function returns whatever is in the text box. If the user clicks Cancel, the function returns a zero-length string ("").

See Also

Salamander Object