


Step 2 − Upon execution, the First input box (length) is displayed. Step 1 − To execute the same, call using the function name and press Enter as shown in the following screenshot. Width = InputBox("Enter Width", "Enter a Number") Length = InputBox("Enter Length ", "Enter a Number") Let us calculate the area of a rectangle by getting values from the user at run time with the help of two input boxes (one for length and one for width). If context is provided, helpfile must also be provided. A Numeric expression that identifies the Help context number assigned by the Help author to the appropriate Help topic. A String expression that identifies the helpfile to be used to provide context-sensitive Help for the dialog box.Ĭontext − An optional parameter. If left blank, the input box is vertically centered. The position of Y axis represents the prompt distance from the left side of the screen vertically. If left blank, the input box is horizontally centered. The position of X axis represents the prompt distance from the left side of the screen horizontally. A default text in the text box that the user would like to be displayed. If the title is left blank, the application name is placed in the title bar.ĭefault − An optional parameter. A String expression displayed in the title bar of the dialog box. If the message extends to more than a line, then the lines can be separated using a carriage return character (Chr(13)) or a linefeed character (Chr(10)) between each line. The maximum length of prompt is approximately 1024 characters. A String that is displayed as a message in the dialog box. If the user clicks the Cancel button, the function will return an empty string (""). After entering the values, if the user clicks the OK button or presses ENTER on the keyboard, the InputBox function will return the text in the text box. The InputBox function prompts the users to enter values.
