Private Sub CommandButton1_Click()
Dim L As Integer
Dim c As Range, firstAddress As String
Fe2.Activate
L = Fe2.Range("A65536").End(xlUp).Row + 1
If ComboBox1.ListIndex = -1 Then
MsgBox "Pas de Selection Societe", vbCritical, "Invalide"
ComboBox1.SetFocus
Exit Sub
End If
If ComboBox2.ListIndex = -1 Then
MsgBox "Pas de Selection Contact", vbCritical, "Invalide"
ComboBox2.SetFocus
Exit Sub
End If
With Sheets("Feuil2").Columns("A")
Set c = .Find(ComboBox1.Value, LookIn:=xlValues, lookat:=xlWhole)
If Not c Is Nothing Then
firstAddress = c.Address
Do
If c.Offset(0, 1).Value = ComboBox2.Value Then
With Sheets("Selections")
.Range("A" & L) = ComboBox1.Value
.Range("B" & L) = ComboBox2.Value
.Range("C" & L) = c.Offset(0, 2).Value
.Range("D" & L) = c.Offset(0, 3).Value
End With
Exit Do
End If
Set c = .FindNext(c)
Loop While Not c Is Nothing And c.Address <> firstAddress
End If
End With
Nettoyage
End Sub