Option Explicit
Dim PlgTablo As Range, LCou As Long, TVLgn()
Private Sub UserForm_Initialize()
Actualiser
End Sub
Private Sub Actualiser()
Dim T(), L As Long
Set PlgTablo = [Tableau3]
T = PlgTablo.Columns(1).Value
For L = 1 To UBound(T, 1): T(L, 1) = CStr(T(L, 1)): Next L
ComboBox1.List = T
End Sub
Private Sub ComboBox1_Change()
LCou = ComboBox1.ListIndex + 1
If LCou = 0 Then ReDim TVLgn(1 To 1, 1 To 5) Else TVLgn = PlgTablo.Rows(LCou).Value
Garnir
End Sub
Private Sub Garnir()
Dim C As Long
For C = 2 To 5: Me("TextBox" & C - 1).Text = TVLgn(1, C): Next C
End Sub
Private Sub CommandButton1_Click()
Dim C As Long
For C = 2 To 5: TVLgn(1, C) = Me("TextBox" & C - 1).Text: Next C
If LCou = 0 Then
LCou = PlgTablo.Rows.Count + 1
TVLgn(1, 1) = WorksheetFunction.Max(PlgTablo.Columns(1)) + 1: End If
PlgTablo.Rows(LCou).Value = TVLgn
Actualiser
End Sub