InputBox$ Function
Syntax
InputBox[$](Prompt$[, Title$][, Default$][, XPos, YPos])
Group
Description
Displays an input box where the user can enter a line of text. Clicking OK returns the entered string. Clicking Cancel returns a null string.
Parameters
| Parameters | Description |
|---|---|
| Prompt$ | Use this string value as the prompt in the input box. |
| Title$ | Use this string value as the title of the input box. If this is omitted, the input box does not have a title. |
| Default$ | Use this string value as the initial value in the input box. If this is omitted, the initial value is blank. |
| XPos | When the dialog is put up the left edge will be at this screen position. If this is omitted, the dialog is centered. |
| YPos | When the dialog is put up the top edge will be at this screen position. If this is omitted, the dialog is centered. |
Example
Sub Main Dim L$ L$ = InputBox$("Enter some text:", _ "Input Box Example","asdf") Debug.Print L$ End Sub