1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
| Private Sub ComboBox1_Change()
Dim i As Byte
With ComboBox1
For i = 5 To 8
Controls("TextBox" & i) = Sheets("feuil1").Cells(.List(.ListIndex, 1), i)
ComboBox2 = Sheets("feuil1").Cells(.List(.ListIndex, 1), 1)
TextBox25 = Sheets("feuil1").Cells(.List(.ListIndex, 1), 12)
TextBox26 = Sheets("feuil1").Cells(.List(.ListIndex, 1), 13)
TextBox27 = Sheets("feuil1").Cells(.List(.ListIndex, 1), 14)
TextBox28 = Sheets("feuil1").Cells(.List(.ListIndex, 1), 15)
TextBox29 = Sheets("feuil1").Cells(.List(.ListIndex, 1), 16)
TextBox30 = Sheets("feuil1").Cells(.List(.ListIndex, 1), 17)
TextBox31 = Sheets("feuil1").Cells(.List(.ListIndex, 1), 18)
TextBox32 = Sheets("feuil1").Cells(.List(.ListIndex, 1), 19)
TextBox33 = Sheets("feuil1").Cells(.List(.ListIndex, 1), 20)
TextBox34 = Sheets("feuil1").Cells(.List(.ListIndex, 1), 21)
TextBox35 = Sheets("feuil1").Cells(.List(.ListIndex, 1), 22)
TextBox36 = Sheets("feuil1").Cells(.List(.ListIndex, 1), 23)
TextBox37 = Sheets("feuil1").Cells(.List(.ListIndex, 1), 24)
TextBox38 = Sheets("feuil1").Cells(.List(.ListIndex, 1), 25)
TextBox39 = Sheets("feuil1").Cells(.List(.ListIndex, 1), 26)
TextBox10 = DateAdd("d", TextBox25, TextBox5)
TextBox11 = DateAdd("d", TextBox26, TextBox5)
TextBox12 = DateAdd("d", TextBox27, TextBox5)
TextBox13 = DateAdd("d", TextBox28, TextBox5)
TextBox14 = DateAdd("d", TextBox29, TextBox5)
TextBox15 = DateAdd("d", TextBox30, TextBox5)
TextBox16 = DateAdd("d", TextBox31, TextBox5)
TextBox17 = DateAdd("d", TextBox32, TextBox5)
TextBox18 = DateAdd("d", TextBox33, TextBox5)
TextBox19 = DateAdd("d", TextBox34, TextBox5)
TextBox20 = DateAdd("d", TextBox35, TextBox5)
TextBox21 = DateAdd("d", TextBox36, TextBox5)
TextBox22 = DateAdd("d", TextBox37, TextBox5)
TextBox23 = DateAdd("d", TextBox38, TextBox5)
TextBox24 = DateAdd("d", TextBox39, TextBox5)
Next i
End With
End Sub |
Partager