Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Function Declaration
-
Function InputBox(Prompt As Variant, Optional Title As Variant, Optional Default As Variant, Optional XPos As Variant, Optional YPos As Variant, Optional HelpFile As Variant, Optional Context As Variant) As String
|
Parameter |
Description |
|---|---|
|
Prompt |
String data value to be displayed as the message in the dialog box. The maximum length of prompt is approximately 1024 characters, depending on the width of the characters used. If prompt consists of more than one line, the lines can be separated using a carriage return character (Chr(13)), a linefeed character (Chr(10)), or carriage return + linefeed character combination (Chr(13) & Chr(10)) between each line. |
|
Title |
String to be displayed in the title bar of the dialog box. If Title is omitted, the project name( 4.1) is placed in the title bar. |
|
Default |
String to be displayed in the text box as the default response if no other input is provided. If Default is omitted, the text box is displayed empty. |
|
XPos |
Long that specifies, in twips, the horizontal distance of the left edge of the dialog box from the left edge of the screen. If XPos is omitted, the dialog box is horizontally centered. |
|
YPos |
Long that specifies, in twips, the vertical distance of the upper edge of the dialog box from the top of the screen. If YPos is omitted, the dialog box is vertically positioned approximately one-third of the way down the screen. |
|
HelpFile |
String that identifies the Help file to use to provide context-sensitive Help for the dialog box. If HelpFile is provided, Context MUST also be provided. |
|
Context |
Long that is the Help context number assigned to the appropriate Help topic by the Help author. If Context is provided, HelpFile MUST also be provided. |
Runtime Semantics.
§ 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.
§ When both HelpFile and Context are provided, the user can press F1 to view the Help topic corresponding to the context. Some host applications can also automatically add a Help button to the dialog box. 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 ("").
§ Note: to specify more than the first named argument, you MUST use InputBox in an expression.
-
-
-
To omit some positional arguments, you MUST include the corresponding comma delimiter.
-
-