Private Sub ComboBox1_Change()
If ComboBox1 <> "" Then
Call Rech1
Else
Exit Sub
End If
End Sub
Private Sub Rech1()
Dim J As Long
Nettoyage 'Lance le programme Nettoyage
Me.ComboBox2.Clear 'Efface les données de la combobox2
If Me.ComboBox1.ListIndex = -1 Then Exit Sub
With Me.ComboBox2
For J = 2 To NbLignes
If Ws.Range("A" & J) = Me.ComboBox1 Then
.AddItem Ws.Range("B" & J)
.List(.ListCount - 1, 1) = J
End If
Next J
End With
End Sub
Private Sub ComboBox2_Change()
If ComboBox2 <> "" Then
Call Rech2
Else
Exit Sub
End If
End Sub
Private Sub Rech2()
Dim Ligne As Long
Dim I As Integer
Dim TB
Nettoyage 'Lance le programme Nettoyage
If Me.ComboBox2.ListIndex = -1 Then Exit Sub
Ligne = Me.ComboBox2.List(Me.ComboBox2.ListIndex, 1)
For I = 1 To 33
Me.Controls("TB" & I) = Ws.Cells(Ligne, I + 2)
Next I
End Sub