Private Sub ComboBox1_Change()
Dim sh As Worksheet
If Me.ComboBox1.Value = "" Then Exit Sub
Set sh = Sheets("LAD")
Compte = ComboBox1.ListIndex
li = Me.ComboBox1.ListIndex + 5
Me.TextBox2 = sh.Cells(li, 1)
Me.TextBox4 = sh.Cells(li, 6)
Me.TextBox5 = sh.Cells(li, 2)
With Me.ComboBox1
.RowSource = "Noms"
.Value = sh.Cells(li, 5)
End With
Me.TextBox2 = sh.Cells(li, 1)
Me.TextBox4 = sh.Cells(li, 6)
Me.TextBox5 = sh.Cells(li, 2)
End Sub
Private Sub CommandButton1_Click()
Unload UserForm1
End Sub
Private Sub CommandButton2_Click()
Do Until Compte >= ComboBox1.ListCount - 1
Compte = Compte + 1
If ComboBox1.List(Compte) = ComboBox1 Then ComboBox1.ListIndex = Compte: Exit Sub
Loop
End Sub