Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

need help with vb 6.0

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I need to know how to make it so when some clicks on a name in one list box the person's Number appears in the other please help..
 
Dim i As Integer
Dim listitem As String 'or whatever
'THIS PARTICULAR CODE REMOVES ITEMS FROM LIST2 TO THE OTHER LISTBOX LIST1

Code:
If list2.ListIndex = -1 Then Exit Sub

For i = list2.ListCount - 1 To 0 Step -1

If list2.Selected(i) = True Then
listitem= list2.List(i) 
List1.AddItem tablename

list2.RemoveItem i

End If

Next i

hope it helps
::)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top