I hope to give me the code that I can getting down to new line (listbox) (vb6)
thanks
New Line in listbox (vb6)New Line in listbox (vb6)
Page 1 of 1
7 Replies - 4226 Views - Last Post: 31 May 2010 - 12:41 PM
Replies To: New Line in listbox (vb6)
#3
Re: New Line in listbox (vb6)
Posted 30 May 2010 - 04:29 AM
#4
Re: New Line in listbox (vb6)
Posted 30 May 2010 - 05:07 AM
assuming your index begin from 0. here is an example:
Private Sub Command1_Click()
Dim i As Integer
'add 3 items in listbox'
List1.AddItem "it1"
List1.AddItem "it2"
List1.AddItem "it3"
'show the 3 items added'
For i = 0 To List1.ListCount - 1
MsgBox List1.List(i)
Next
End Sub
#5
Re: New Line in listbox (vb6)
Posted 30 May 2010 - 09:45 AM
NoBrain, on 30 May 2010 - 04:07 AM, said:
assuming your index begin from 0. here is an example:
Private Sub Command1_Click()
Dim i As Integer
'add 3 items in listbox'
List1.AddItem "it1"
List1.AddItem "it2"
List1.AddItem "it3"
'show the 3 items added'
For i = 0 To List1.ListCount - 1
MsgBox List1.List(i)
Next
End Sub
I don't want this code .. I will explain for you what I mean
I have two ( listbox)
suppose I have two lists ok!! I want when the word in list1 is the same in list2 is getting down in list1 and list2
#6
Re: New Line in listbox (vb6)
Posted 30 May 2010 - 11:03 AM
well yea 
now put 2 for cycles one in another that way you can check if the items in listbox 1 is in listbox 2 and the part where i show the items replace it to populate the textboxes
now put 2 for cycles one in another that way you can check if the items in listbox 1 is in listbox 2 and the part where i show the items replace it to populate the textboxes
#7
Re: New Line in listbox (vb6)
Posted 31 May 2010 - 12:15 PM
NoBrain, on 30 May 2010 - 10:03 AM, said:
well yea 
now put 2 for cycles one in another that way you can check if the items in listbox 1 is in listbox 2 and the part where i show the items replace it to populate the textboxes
now put 2 for cycles one in another that way you can check if the items in listbox 1 is in listbox 2 and the part where i show the items replace it to populate the textboxes
Look
http://rapidshare.co...5/test.rar.html
#8
Re: New Line in listbox (vb6)
Posted 31 May 2010 - 12:41 PM
0 effort do you even try it.
ok so here is how we list if items from listbox1 searching for the match in listbox2
i hope you make it from here ...
ok so here is how we list if items from listbox1 searching for the match in listbox2
Private Sub Command1_Click()
Dim i, l As Integer
For i = 0 To List1.ListCount - 1
For l = 0 To List2.ListCount - 2
'we list every element in listbox2'
'while 1 element from listbox1 is selected'
Next l
Next i
End Sub
i hope you make it from here ...
This post has been edited by NoBrain: 31 May 2010 - 12:42 PM
Page 1 of 1
|
|

New Topic/Question
Reply




MultiQuote




|