InputBox$

User dialog function.

The InputBox$ function displays a dialog box for accepting user input.

Usage

Used for asking the user a question. The text value is populated into a variable. If his answer must be hidden, use InputBoxSecret$ function.

Syntax

var$=InputBox$(<Prompt> [, [<Title>][, [<Default_answer>][, [<X>], [<Y>]]]])

Parameters

<Prompt>, string, prompt in the dialog box above the edit box where the user can enter input. At execution, the script is paused, waiting the user to click a button.

<Title>, optional string, title of the dialog box.

<Default_answer>, optional default answer inserted into the edit box.

<X>,<Y>, optional integers, coordinates of the top-left point of the Inputbox.

Return value

If the button OK is selected, var$ contains whatever was entered in the edit box. If the button Cancel is selected, var$ contains "ID_CANCEL".

See also

InputBoxSecret$

Examples

 

Var$ = InputBox$("Hello : ","Title :", "Today")

Var$ = InputBox$( prompt$, title$, default$, var_x, var_y)

Var$ = InputBox$( prompt$)

Var$ = InputBox$( prompt$, , , 100, 100)