INPUTBOX Function tutorials

This function will display a prompt in a dialog box, wait for user to input
Text or click a button and then return the content of the text box.

Syntax

InputBox ( Prompt , Title , Default )

Prompt

This is string expression displayed as the message in the dialog box. The
maximum length of prompt is approximately 1024 characters. If prompt consists
of more than one line, you can separate the lines using a Chr(13) or Chr(10)

Title

This is 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

This string will be displayed in Text Box as default value. If user does
not enter any data then it will be default value. If you omit default, the text
box is displayed empty.

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 ("")

Program
to test InputBox Function

name = InputBox("Enter your
name")

MsgBox ("Your entered name is :
" & name)

no= InputBox("Enter any no")

MsgBox ("Your entered no is : "
& no)

MsgBox ("no + no : " &
no+no)

Output

Write your observation here

Thank you for visiting www.cbtSAM.com. This site is dream of Samir Patel, when most people dream when in sleep, my dream doesn't let me sleep. cbtSAM Web site is provided as a service and learning tool to the public. While the information contained within the site is periodically updated,no guarantee is given that the iormation provided in this Web site is correct, complete, and up-to-date. We are not responsible for... Read More .