InputBox(Prompt: String[, Title: String, Default: String, PasswordChar: Char]): String
Displays a prompt in a dialog box, User must input text or click a button, returns a string containing the contents of the text box.
Notes: If User clicks OK or presses Enter, InputBox function returns what is in the text box (empty string "" if no value entered). If User clicks Cancel or presses Esc, function returns Null.
InputBox function syntax has these named arguments:
Parameter |
Description |
|---|---|
Prompt |
Required. String expression displayed as the message in the dialog box. |
Title |
Optional. String expression displayed in the title bar of the dialog box. If you omit title, the application name is placed in the title bar. |
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. |
PasswordChar |
Optional. Character displayed in the text box to mask user input. |
See also Scripted Form InputBox method and Input Grid InputBox method.