Private Sub lbx1_Change()
If Not EnableEvents Then Exit Sub
On Error Resume Next
C = 0
For I = 0 To lbx1.ListCount - 1
If lbx1.Selected(I) Then C = C + 1
If C > 3 Then lbx1.Selected(lbx1.ListIndex) = 0
Next I
If Me.OptionButton1 Then
deb = 1
fin = 6
Else
deb = 7
fin = 12
End If
If lbx1.Selected(lbx1.ListIndex) = True Then
For w = deb To fin
If Me("T" & w) = "" Then
Me("T" & w) = lbx1.List(lbx1.ListIndex, 1)
Me("T" & w + 3) = lbx1.List(lbx1.ListIndex, 2 + w - 1)
Exit For
End If
Next w
Else
For Each w In Array(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)
If w.Value = lbx1.List(lbx1.ListIndex, 1) Or w.Value = lbx1.List(lbx1.ListIndex, 2) Then
Me(w.Name) = ""
End If
Next w
End If
End Sub