Bonjour Bruno
A suivre tu voudras bien trouver un petit bout de programme que j'utilise et qui semble répondre à ton problême;J'ai juste fait un copier coller aussi tu pourras "manipuler" le code selon tes besoins.Attention!!!! je suis débutant en vba alors sois indulgent si ma façon de traiter le problême peut sembler archaique.
Je profite de ce message (qui est le premier que j'envoie)pour remercier tous ceux qui participent à ce forum et dont les réponses aux questions posées sont d'une aide très précieuse.
Bien amicalement
jacquesderyes
***********************************************************
Sub TRANSCOMBO()
Dim transfert As String
Dim c As Range
Dim AUTRE
transfert = UserForm1.ComboBox1.Value
If UserForm1.ComboBox1.Value = "" Then
MsgBox "VEUILLEZ INDIQUER UNE VALEUR!.", vbCritical, Title:="ERREUR DE SAISIE"
Exit Sub
End If
On Error GoTo AUTRE
Set c = Sheets("Feuil1").Range("C8:C50").Find(What:=transfert, LookIn:=xlValues, LookAt:=xlWhole, MatchCase:=False)
c.Select
MsgBox "LA REFERENCE: " & transfert & " A ETE TROUVEE"
Unload UserForm1
Exit Sub
AUTRE:
MsgBox "LA REFERENCE: " & transfert & " N'A PAS ETE TROUVEE"
Application.Goto Reference:="TOP"
Selection.End(xlDown).Select
ActiveCell.Offset(1, 0).Value = transfert
ActiveCell.Offset(1, -1).Value = ActiveCell.Offset(0, -1).Value + 1
With ActiveCell.Offset(1, 0)
.Font.Bold = True
.Font.ColorIndex = 3
End With
With ActiveCell
.Font.Bold = False
.Font.ColorIndex = 1
End With
Unload UserForm1
End Sub