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 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81
|
Sub RempliCombo()
Dim a As Integer
Dim b As Integer
Dim c As Integer
Dim d As Integer
Dim e As Integer
a = 1
b = 1
c = 3
d = 1
e = 1
With Sheets("Données")
While .Cells(a, 19) <> ""
Csex.AddItem .Cells(a, 19)
a = a + 1
Wend
While .Cells(b, 21) <> ""
Csitfam.AddItem .Cells(b, 21)
b = b + 1
Wend
While .Cells(c, 13) <> ""
Cserv.AddItem .Cells(c, 13)
c = c + 1
Wend
While .Cells(d, 20) <> ""
Csit.AddItem .Cells(d, 20)
d = d + 1
Wend
While .Cells(e, 18) <> ""
Cpos.AddItem .Cells(e, 18)
e = e + 1
Wend
End With
End Sub
Sub PlaceCombo()
Dim a As Integer
Dim b As Integer
Dim c As Integer
Dim d As Integer
Dim e As Integer
a = 1
b = 1
c = 3
d = 1
e = 1
With Sheets("Adhé")
For a = 0 To Csex.ListCount
If Csex.List(a) = .Cells(Ligne, 8) Then
Csex.ListIndex = a
Exit For
End If
Next a
For b = 0 To Csitfam.ListCount
If Csitfam.List(b) = .Cells(Ligne, 10) Then
Csitfam.ListIndex = b
Exit For
End If
Next b
For c = 0 To Cserv.ListCount
If Cserv.List(c) = .Cells(Ligne, 6) Then
Cserv.ListIndex = c
Exit For
End If
Next c
For d = 0 To Csit.ListCount
If Csit.List(d) = .Cells(Ligne, 11) Then
Csit.ListIndex = d
Exit For
End If
Next d
For e = 0 To Cpos.ListCount
If Cpos.List(e) = .Cells(Ligne, 12) Then
Cpos.ListIndex = e
Exit For
End If
Next e
End With
End Sub |
Partager