Ask Experts Questions for FREE Help !
Ask
    jram1507's Avatar
    jram1507 Posts: 1, Reputation: 1
    New Member
     
    #1

    Mar 1, 2010, 08:09 AM
    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
    steadysimple's Avatar
    steadysimple Posts: 9, Reputation: 1
    New Member
     
    #2

    Mar 28, 2010, 07:34 PM

    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

Not your question? Ask your question View similar questions

 

Question Tools Search this Question
Search this Question:

Advanced Search

Add your answer here.


Check out some similar questions!

Display array in list box [ 1 Answers ]

Hi all, How do I display a whole array in one list box? (I want it to be displayed in the form load event... is that possible?) For example I want to display these: ============================ mstrMonths(0) = "January" mstrMonths(1) = "February" mstrMonths(2) =...

Access Text Box issue. [ 11 Answers ]

How do you force a text box on a report page to auto flow into a second page of the report... page 1 and two have different page headers... Can grow is not a viable option as I need the remaining boxes on the page to remain in place... The text box in the report is bound to a text box in a form. ...

Combo box/list box/drop down box [ 1 Answers ]

I have a question for you in regards to a list box in a query. I have a form that I am using and want to give the users some options on what years they want to pull data from. So I was thinking about creating a list box or drop down box that would display the available years, when they highlighted...


View more questions Search