InputBoxIn the next examples we want to receive a value
from the user when the program is running.
To do so we will use the InputBox command.
The InputBox command syntax is:
VariableName = InputBox ("Text to Display")
After executing this command, the variable
will get the value that the user has entered.
Example:
Put 1 Command button on your form and
enter the following code to its click event:
Dim Elvis As String
Elvis = InputBox("Please Enter your name")
Print Elvis
Run the program and click the button.
A Message Box is appearing with the
text "Please Enter your name" (Figure 1).
from the user when the program is running.
To do so we will use the InputBox command.
The InputBox command syntax is:
VariableName = InputBox ("Text to Display")
After executing this command, the variable
will get the value that the user has entered.
Example:
Put 1 Command button on your form and
enter the following code to its click event:
Dim Elvis As String
Elvis = InputBox("Please Enter your name")
Print Elvis
Run the program and click the button.
A Message Box is appearing with the
text "Please Enter your name" (Figure 1).
Figure 1
Type your name in the text box, and press OK.
Your name will be printed on the form.
Your name will be printed on the form.
কোন মন্তব্য নেই:
একটি মন্তব্য পোস্ট করুন