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 82 83 84 85 86 87 88 89 90 91 92 93 94 95
| Private Sub ComboBox2_Click()
Dim Poteau_Serreur As String, Poteau_VEC As String, Poteau_SOF As String, Poteau_VEP As String, Poteau_1100Serreur As String, Cadre_Serreur As String, Cadre_VEC As String, Cadre_SOF As String, Cadre_VEP As String, Cadre_1100Serreur As String, Joint_Serreur As String, Joint_VEC As String, Joint_SOF As String, Joint_VEP As String, Joint_1100Serreur As String
Poteau_Serreur = "Data!C59:C65"
Poteau_VEC = "Data!A59:A60"
Poteau_SOF = "Data!D59:D60"
Poteau_VEP = "Data!B59:B61"
Poteau_1100Serreur = "Data!E59:E60"
Cadre_VEC = "Data!G59:G62"
Cadre_VEP = "Data!H59:H62"
Cadre_Serreur = "Data!I59:I61"
Cadre_SOF = "Data!J59:J61"
Cadre_1100Serreur = "Data!K59:K60"
Joint_VEC = "Data!A71:A75"
Joint_VEP = "Data!B71:B73"
Joint_Serreur = "Data!C71:C73"
Joint_SOF = "Data!D71"
Joint_1100Serreur = "Data!E71"
With Sheets("Data")
If .Range("B43").Value = "W80" And .Range("B49").Value = "VEC" Then
ActiveSheet.ComboBox3.ListFillRange = Poteau_VEC
ActiveSheet.ComboBox3.ListIndex = 0
ActiveSheet.ComboBox3.ListRows = 2
End If
If .Range("B43").Value = "W80" And .Range("B49").Value = "VEP" Then
Me.ComboBox3.ListFillRange = Poteau_VEP
Me.ComboBox3.ListIndex = 0
Me.ComboBox3.ListRows = 3
End If
If .Range("B43").Value = "W44" And .Range("B49").Value = "Serreur" Then
Me.ComboBox3.ListFillRange = Poteau_Serreur
Me.ComboBox3.ListIndex = 0
Me.ComboBox3.ListRows = 6
End If
If .Range("B43").Value = "W44" And .Range("B49").Value = "Serreur+OF" Then
Me.ComboBox3.ListFillRange = Poteau_SOF
Me.ComboBox3.ListIndex = 0
Me.ComboBox3.ListRows = 2
End If
If .Range("B43").Value = "1100" And .Range("B49").Value = "Serreur" Then
Me.ComboBox3.ListFillRange = Poteau_1100Serreur
Me.ComboBox3.ListIndex = 0
Me.ComboBox3.ListRows = 2
End If
If .Range("B43").Value = "W80" And .Range("B49").Value = "VEC" Then
Me.ComboBox4.ListFillRange = Cadre_VEC
Me.ComboBox4.ListIndex = 0
Me.ComboBox4.ListRows = 4
End If
If .Range("B43").Value = "W80" And .Range("B49").Value = "VEP" Then
Me.ComboBox4.ListFillRange = Cadre_VEP
Me.ComboBox4.ListIndex = 0
Me.ComboBox4.ListRows = 4
End If
If .Range("B43").Value = "W44" And .Range("B49").Value = "Serreur" Then
Me.ComboBox4.ListFillRange = Cadre_Serreur
Me.ComboBox4.ListIndex = 0
Me.ComboBox4.ListRows = 3
End If
If .Range("B43").Value = "W44" And .Range("B49").Value = "Serreur+OF" Then
Me.ComboBox4.ListFillRange = Cadre_SOF
Me.ComboBox4.ListIndex = 0
Me.ComboBox4.ListRows = 3
End If
If .Range("B43").Value = "1100" And .Range("B49").Value = "Serreur" Then
Me.ComboBox4.ListFillRange = Cadre_1100Serreur
Me.ComboBox4.ListIndex = 0
Me.ComboBox4.ListRows = 2
End If
If .Range("B43").Value = "W80" And .Range("B49").Value = "VEC" Then
Me.ComboBox5.ListFillRange = Joint_VEC
Me.ComboBox5.ListIndex = 0
Me.ComboBox5.ListRows = 5
End If
If .Range("B43").Value = "W80" And .Range("B49").Value = "VEP" Then
Me.ComboBox5.ListFillRange = Joint_VEP
Me.ComboBox5.ListIndex = 0
Me.ComboBox5.ListRows = 3
End If
If .Range("B43").Value = "W44" And .Range("B49").Value = "Serreur" Then
Me.ComboBox5.ListFillRange = Joint_Serreur
Me.ComboBox5.ListIndex = 0
Me.ComboBox5.ListRows = 3
End If
If .Range("B43").Value = "W44" And .Range("B49").Value = "Serreur+OF" Then
Me.ComboBox5.ListFillRange = Joint_SOF
Me.ComboBox5.ListIndex = 0
Me.ComboBox5.ListRows = 1
End If
If .Range("B43").Value = "1100" And .Range("B49").Value = "Serreur" Then
Me.ComboBox5.ListFillRange = Joint_1100Serreur
Me.ComboBox5.ListIndex = 0
Me.ComboBox5.ListRows = 1
End If
End With
End Sub |
Partager