Displays a prompt in a window, waits for the user to input text or click a button, and returns the contents of the text box.
In the PROMOTIC system it is better to use the PmForm object.
String InputBox(String prompt, [String title], [String default], [Integer xpos], [Integer ypos], [String helpfile], [Integer context])
|prompt||(String) Text presented as a message in the window. 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, then you can separate the lines using the vbCr, vbLf or vbCrLf constants between each line.|
|title||[optional](String) Text string presented in the title bar of the window. If not set, then the application name is placed in the title bar.|
|default||[optional](String) Text string presented in the text box as the default response if no other input is provided. If not set, then the text box is empty.|
|xpos||[optional](Integer) Specifies the horizontal distance of the left upper corner of the window from the left upper corner of the screen (in pixels). If not set, then the window is horizontally centered.|
|ypos||[optional](Integer) Specifies the vertical distance of the left upper corner of the window from the left upper corner of the screen (in pixels). If not set, then the window is vertically positioned approximately 1/3 of the way down the screen.|
|helpfile||[optional](String) Path to the Help file to use to provide context-sensitive Help for the window. If set, then the context parameter must also be provided.|
|context||[optional](Integer) The Help context number assigned by the Help author to the appropriate Help topic. If set, then the helpfile parameter must also be provided.|
If the user clicks the "OK" button or presses Enter key, then the function returns String whatever is in the text box.
If the user clicks the "Cancel" button, then function returns a zero-length string ("").
If both helpfile and context are supplied, then the "Help" button is automatically added to the window.
VBScriptSelect and copy to clipboard
sInput = InputBox("Enter your name")
MsgBox "You entered:" & sInput