How to Include List Box control in your project
A list box is used for representing the users with a data. You can prefer the data from the list box for data entry. No editing is possible in the list box. If you want to edit you must use a combo box control.
Illustration: A Project to describe the Use of List Box
1) Establish a new Project by choosing a File and then the New Project.
2) Suppose the project type be Standard EXE.
3) Add a list box and a text box to the form.
4) Double click on the form. And add the coding given below:
Private Sub Form_Load()
This will generate a list box as shown in the figure with the contents a, b, c & d.
5) Relate the click event with the list box
Private Sub List1_Click()
Text1.Text = List1.Text
Whenever an item is clicked in the list box, the contents will be transferred to the Text Box.
Figure: A Form with Combo Box Control