Bonsoir à tous,
voila mon probleme, j ai créé un USF avec un ComboBox et 5 TextBox,
J aimerai que quand je choisi un nombre dans ma combobox, il m affiche les autre cellule dans les textbox, mais voila, ca n affiche rien....
je cal un peu...
j ai deja cherché un peu (bcp..) sur le forum, mais je bloque sur la fait de prendre les donnees sur une autre page je pense...
voila mon code,
Private Sub UserForm2_Initialize()
With Sheets("ORIGINAL")
For i = 2 To .[D65536].End(xlUp).Row
If .Cells(i, 1) <> .Cells(i - 1, 1) Then
ComboBox1.AddItem .Cells(i, 1).Value
End If
Next
End With
End Sub
Private Sub ComboBox1_Change()
Dim lign As Long
If UserForm2.ComboBox1 <> "" Then
lign = UserForm2.ComboBox1.ListIndex + 2
UserForm2.TextBox1 = Sheets("ORIGINAL").Range("A" & lign).Value
UserForm2.TextBox2 = Sheets("ORIGINAL").Range("F" & lign).Value
UserForm2.TextBox3 = Sheets("ORIGINAL").Range("G" & lign).Value
UserForm2.TextBox4 = Sheets("ORIGINAL").Range("H" & lign).Value
UserForm2.TextBox5 = Sheets("ORIGINAL").Range("I" & lign).Value
End If
End Sub
si quelqu un peu m aidé...
Merci