In the next examples we want to receive a
from the user when the program is running.
To do so we will use the InputBox
command syntax is:VariableName
= InputBox ("Text to
After executing this command, the variable
will get the
value that the user has entered.
Put 1 Command button on your form and
following code to its click event:Dim Elvis As String
InputBox("Please Enter your name")
Run the program
and click the button.
A Message Box is appearing with the
Enter your name" (Figure 1)