' Déclare la Variable L: As Long, Lg As long, Col As Long, I As Long ensuite
Private Sub UserForm_Initialize()
Dim I As Long, L as Long
Set Ws = Sheets("Donné responsable")
' Si il y a des doublons
With Ws
For i = 2 To .Range("a" & Rows.Count).End(xlUp).Row
ComboBox1 = .Range("a" & i)
If ComboBox1.ListIndex = -1 Then ComboBox1.AddItem .Range("a" & i)
Next i
End With
' Sinon
With Sheets("Donné responsable")
L= .Range("a" & Rows.Count).End(xlUp).Row
ComboBox1.List = .Range("a2:a" & L)
End With
End Sub
With Ws
L = .Range("a" & Rows.Count).end(xlUp).Row + 1
.Range("a" & L) = Combobox1
Idem x fois
End With
End With
' Pourquoi tu à mis une boucle et 7 TexBox ( il y en a 6), alors que tu as renommé les Textbox: _ TextBoxSITE -TextBoxFONCTION - TextBoxTELFIXE ???
For I = 1 To 7
Me.Controls(" TextBox " & I) = Ws.Cells(Ligne, I + 2)
Next I
' Tu peux utiliser la boucle, mais il faut réinscrire le nom par défaut: TextBox1 - TextBox2 - TextBox3 etc.
' Pour le bouton 2 tu peux aussi faire comme ceci
With Ws
Lg = Application.Match(ComboBox1, .Columns(1), 0)
.Cells(Lg, 1) = Combobox1
.Cells(Lg, 2) = Combobox2
For Col = 3 To 8
.Cells(Lg, Col) = Controls("TextBox" & Col - 2)
End With