Bonjour
je voie dur dur
a voir si tu comprent ?
Dim Nlig&, C&
Private Sub UserForm_Initialize()
Sheets("Ville1").Select
ComboBox1.List = Range("A2:A" & Range("A" & Rows.Count).End(xlUp).Row).Value
End Sub
Private Sub ComboBox1_Change()
' Lecture
If ComboBox1.ListIndex = -1 Then Exit Sub
Nlig = ComboBox1.ListIndex + 2
For C = 1 To 30
Controls("TextBox" & C).Value = Cells(Nlig, C + 1).Value
Next
End Sub
Private Sub CommandButton1_Click()
'Modifications
Nlig = ComboBox1.ListIndex + 2
For C = 1 To 30
Select Case C
Case 4, 7, 10, 16
Cells(Nlig, C + 1).Value = CDate(Controls("TextBox" & C).Value)
Case Else
Cells(Nlig, C + 1).Value = Controls("TextBox" & C).Value
End Select
Next
End Sub
A+
Maurice