|
-
Jul 26th, 2000, 02:10 PM
#1
Thread Starter
Junior Member
I have 2 user lists.
How do I get it so when I choose Red from the 1 user list it will be picked up in the second user list.
-
Jul 26th, 2000, 02:33 PM
#2
Frenzied Member
is this the sort of thing you require?
Code:
Private Sub Form_Load()
List1.AddItem "Red"
List1.AddItem "Blue"
List1.AddItem "Green"
List1.AddItem "Cyan"
List1.AddItem "Magenta"
List1.AddItem "Yellow"
List2.AddItem "Red"
List2.AddItem "Blue"
List2.AddItem "Green"
List2.AddItem "Cyan"
List2.AddItem "Magenta"
List2.AddItem "Yellow"
End Sub
Private Sub List1_Click()
Dim i As Integer
For i = 0 To List2.ListCount - 1
If List2.List(i) = List1.List(List1.ListIndex) Then
List2.ListIndex = i
Exit For
End If
Next i
End Sub
-
Jul 26th, 2000, 03:20 PM
#3
You can shorten it down a little.
Code:
Private Sub List1_Click()
List2.Text = List1.Text
End Sub
-
Jul 26th, 2000, 03:28 PM
#4
I feel a little nervous correcting a guru, but shouldn't it be:
Code:
List2.AddItem List1.Text
"It's cold gin time again ..."
Check out my website here.
-
Jul 26th, 2000, 03:41 PM
#5
I thought that he had 2 identical ListBox's (each with the same items) and he wanted the second ListBox to select whatever item that was selected in the first ListBox.
-
Jul 26th, 2000, 03:54 PM
#6
Junior Member
what does list1.text return?
-
Jul 27th, 2000, 02:34 AM
#7
Frenzied Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|