Dim i As Byte
Private Sub CommandButton1_Click()
For i = 1 To 7: Controls("Textbox" & i) = "": Next
With Sheets("ARTICLES")
For i = 2 To .Range("a65536").End(xlUp).Row
If .Range("a" & i) = ComboBox1 And .Range("C" & i) = ComboBox2 Then
TextBox1 = .Range("A" & i)
TextBox2 = .Range("D" & i)
TextBox3 = .Range("E" & i)
TextBox4 = .Range("F" & i)
TextBox5 = .Range("G" & i)
TextBox6 = .Range("H" & i)
TextBox7 = .Range("I" & i)
End If
Next i
End With
If TextBox1 = "" Then MsgBox "pas trouve de reference correspondant a la recherche"
End Sub
Private Sub UserForm_Initialize()
With Sheets("ARTICLES"): ComboBox1.List = Range(.[a2], .[a65536].End(xlUp)).Value: End With
With Sheets("ARTICLES"): ComboBox2.List = Range(.[c2], .[c65536].End(xlUp)).Value: End With
End Sub