LsitBox Problem in VB6(PLZ help)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • farhad
    New Member
    • Sep 2006
    • 17

    LsitBox Problem in VB6(PLZ help)

    Hi

    If I have a list box with some date in list, and this list box show in CheckBox Style,and second listbox empty . I want to transfer some of them with one CLICK to second list.

    How can I do?

    Thank you
  • Killer42
    Recognized Expert Expert
    • Oct 2006
    • 8429

    #2
    Originally posted by farhad
    Hi
    If I have a list box with some date in list, and this list box show in CheckBox Style,and second listbox empty . I want to transfer some of them with one CLICK to second list.
    How can I do?
    Thank you
    Is this any help? I just tried it out and it works...
    Code:
    Private Sub Command1_Click()
      For I = 0 To List1.ListCount - 1
        If List1.Selected(I) Then
          List2.AddItem List1.List(I)
        End If
      Next
    End Sub

    Comment

    Working...