Private Sub UserForm_Initialize()
With UserForm2
.Left = 10
.Top = 200
End With
For i = 1 To 10
Controls("TextBox" & i).Value = 0
Next i
End Sub
Private Sub NombreEnfants_AfterUpdate()
Dim nombre As Byte
Dim i As Byte
nombre = NombreEnfants.Value
For i = 1 To nombre
Controls("LabelEnfant" & nombre).Visible = True
Controls("TextBox" & nombre).Visible = True
Next i
End Sub
Private Sub BoutonValider_Click()
Dim i As Byte
With Sheets("Enfants")
For i = 1 To 10
.Range("B" & i) = Controls("TextBox" & i).Value
Next i
End With
Unload UserForm2
End Sub