Bonjour et bienvenue sur le forum
J'ai noté 3 erreurs /
1 -
Private Sub userForm_Initialize()
'TextBox23 = Date ' la date du jour dans une textbox lors de l'ouverture de l'userform .
'Correspond au programme du FORULAIRE
Dim J As Long
Dim I As Integer
Set Ws = Sheets("ABBCFD") 'Attention ce nom doit correspondre au nom de votre ONGLET
With Me.ComboBox1
For J = 4 To Ws.Range("C" & Rows.Count).End(xlUp).Row 'For J = 2 correspond à la deuxième ligne ...
2 -
Private Sub ComboBox1_Change()
Dim Ligne As Long
Dim I As Integer
If Me.ComboBox1.ListIndex = -1 Then Exit Sub
Ligne = Me.ComboBox1.ListIndex + 4
3 - suite du code précédent :
ComboBox2 = Ws.Cells(Ligne, "B")
ComboBox3 = Ws.Cells(Ligne, "L")
ComboBox4 = Ws.Cells(Ligne, "S")
ComboBox5 = Ws.Cells(Ligne, "T")
ComboBox6 = Ws.Cells(Ligne, "U")
ComboBox7 = Ws.Cells(Ligne, "Z")
For I = 1 To 22 'For I = 1 To 22 veut dire nombres de textbox crée dans l'userform,donc si vous avez 17 textbox se sera For I = To 17
Me.Controls("TextBox" & I) = Ws.Cells(Ligne, I + 2)
Bye !