Dim d As Object
Private Sub UserForm_Initialize()
Dim j As Long
Dim i As Integer
Set Ws = Sheets("BDD")
With Me.ComboBox1
For j = 2 To Ws.Range("A" & Rows.Count).End(xlUp).Row
.AddItem Ws.Range("A" & j)
Next j
End With
Set d = CreateObject("scripting.dictionary")
With Sheets("Armoires")
For i = 2 To .[a65000].End(xlUp).Row: d(.Cells(i, 1).Value) = .Cells(i, 2).Value: Next i
End With
End Sub
Private Sub ComboBox1_Change()
Ligne2 = [A2].Offset(ComboBox1.ListIndex, 0).Row
Me.TextBox1.Text = Sheets("BDD").Cells(Ligne2, 1)
Me.TextBox2.Text = Sheets("BDD").Cells(Ligne2, 2)
Me.TextBox3.Text = Sheets("BDD").Cells(Ligne2, 3)
Range("A2").Offset(ComboBox1.ListIndex, 0).Select
Me.TextBox4.Text = d(Me.ComboBox1.Text)
End Sub