I'm new to Visual Basic 6 and I have a question, I've been trying for a while to make a ListBox that "prints" the selection of the list in a TextBox and I could not find the solution until today with one possible I created a command button with the following parameters:
Private Sub Command6_Click()
For i = 0 To List1.ListCount - 1
If List1.Selected(i) Then
Text5.Text = List1.List(i)
End If
Next
End Sub
Having a ListBox identified as List1
and the text box where I want to "print" called Text5
The question is that I need to select multiple options and that these (again) are "printed" in a separate line according to I go selecting and adding with the button different items in the list. Any suggestions?
As an extra in the properties of Text5
is set to accept multilines and List1
to support multiple selection.
In summary, I want to make a multiple selection in a text box independent of the list. Because it's simple, I'm working with an Access database to be able to store the information, but I need to add multiple information in a single Field and I'm not allowed at least with VB6.
Any suggestions to supplement the code or another method is acceptable, THANK YOU!