Dim MonCodeArticle As String
MonCodeArticle = Me.CboCodeArticle.Text
For i = 2 To F3.[A65000].End(xlUp).Row
If F3.Cells(i, 1) = MonCodeArticle Then
Exit For
ElseIf F3.Cells(i, 1) <> MonCodeArticle Then
Resume Next
Else
MsgBox "Aucune gamme détecté", vbCritical + vbOKOnly, ""
Exit Sub
endif
next i
'Suite programme