Ask Me Help Desk

Ask Me Help Desk (https://www.askmehelpdesk.com/forum.php)
-   Visual Basic (https://www.askmehelpdesk.com/forumdisplay.php?f=469)
-   -   List box to text box one by one in vb6 (https://www.askmehelpdesk.com/showthread.php?t=452963)

  • Mar 1, 2010, 08:09 AM
    jram1507
    List box to text box one by one in vb6
    I am working with vb6 & I am novice too.

    I have 5 text boxes and only one list box and I want to select list from list box to text box one after another. It is a single list only to text box.

    With advanced thanks

    S. Jeyaraman
  • Mar 28, 2010, 07:34 PM
    steadysimple

    1) Rename your textbox to Text1, Text2, Text3, Text4 and Text5.
    2) Double click List1. The code should be like this:-
    Private Sub List1_Click()
    List1.ListIndex=0
    Text1.Text=List1.Text
    List1.ListIndex=1
    Text2.Text=List1.Text
    List1.ListIndex=2
    Text3.Text=List1.Text
    List1.ListIndex=3
    Text4.Text=List1.Text
    List1.ListIndex=4
    Text5.Text=List1.Text
    End Sub

  • All times are GMT -7. The time now is 01:07 PM.