Bonjour,
Je reviens encore une fois sur le forum aujourd'hui car voila j'ai continuer mon développement de mon fichier excel et je retombe sur un petit problème :
J'aimerais que dans ma textbox1 suivant le choix fait dans l'une de mes combobox le choix apparaisse
Le code actuel :
Private Sub UserForm_Initialize()
Dim O As Worksheet
Dim DL As Integer
Set O = Sheets("Feuil1")
DL = O.Cells(Application.Rows.Count, 1).End(xlUp).Row
With ComboBox1
.List = O.Range("A2:A" & DL).Value
.Style = fmStyleDropDownList
End With
With ComboBox2
.List = O.Range("B2:B" & DL).Value
.Style = fmStyleDropDownList
End With
End Sub
Private Sub ComboBox1_Change()
Me.ComboBox2.ListIndex = Me.ComboBox1.ListIndex
End Sub
Private Sub ComboBox2_Change()
Me.ComboBox1.ListIndex = Me.ComboBox2.ListIndex
End Sub
J'ai essayer en insérant cela mais cela n'a pas fonctionner
Private Sub ComboBox1_Change()
Me.ComboBox2.ListIndex = Me.ComboBox1.ListIndex
TextBox1.AddItem Cells(3, ComboBox1.ListIndex)
End Sub
Private Sub ComboBox2_Change()
Me.ComboBox1.ListIndex = Me.ComboBox2.ListIndex
TextBox1.AddItem Cells(3, ComboBox1.ListIndex)
End Sub