|
-
Oct 29th, 2009, 01:14 AM
#1
Thread Starter
Junior Member
[RESOLVED] Hel with listboxes needed
People I have with me 2 listboxes(8 options) each having the same option at same index.
I want to avoid the possibility of same option being selected from both lists.
Its like team 1 vs team 2 so you probably get the idea right.
There are 8 teams.
I have no idea as to how to code this, so please help.
-
Oct 29th, 2009, 01:36 AM
#2
Re: Hel with listboxes needed
Hope this helps
Code:
Private Sub Command1_Click()
If List1.ListIndex = List2.ListIndex Then
'if both of them have the same selection
MsgBox "selection not allowed"
End If
End Sub
Please mark you thread resolved using the Thread Tools as shown
-
Oct 29th, 2009, 02:53 AM
#3
Re: Hel with listboxes needed
try something like this... with 2 listbox
Code:
Private Sub Form_Load()
For i = 1 To 8
List1.AddItem "Team " & i
List2.AddItem "Team " & i
Next
End Sub
Private Sub List1_Click()
If List1.ListIndex = List2.ListIndex Then
MsgBox "same team selected"
End If
End Sub
Private Sub List2_Click()
If List1.ListIndex = List2.ListIndex Then
MsgBox "same team selected"
End If
End Sub
hope u tried the samething with option button in another post is it? but there i cudnt get u, now i hope u got the idea for option button also...
Last edited by seenu_1st; Oct 29th, 2009 at 02:58 AM.
-
Oct 29th, 2009, 03:28 AM
#4
Thread Starter
Junior 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
|