centrino34
XLDnaute Nouveau
bonjour qui peut m aider je n arrive pas a régler ma macro une case cocher décoche l autre avec les résultat dans la cellule merci d avance
[Private Sub CheckBox5_Click()
If CheckBox5.Value = True Then
CheckBox6.Value = False
ElseIf Range("D8") <= 82 Then Range("F16") = "1"
Range("G16") = "1111111111"
ElseIf Range("D8") <= 164 Then Range("F16") = "2"
Range("G16") = "1111111111"
ElseIf Range("D8") <= 240 Then Range("F16") = "3"
Range("G16") = "1111111111"
ElseIf Range("D8") <= 320 Then Range("F16") = "4"
Range("G16") = "1111111111"
ElseIf Range("D8") <= 400 Then Range("F16") = "5"
Range("G16") = "1111111111"
Else
Range("F16").Value = ""
Range("G16").Value = ""
End If
End Sub
Private Sub CheckBox6_Click()
If CheckBox6.Value = True Then
CheckBox5.Value = False
ElseIf Range("D8") <= 82 Then Range("F17") = "1"
Range("G17") = "2222222222"
ElseIf Range("D8") <= 164 Then Range("F17") = "2"
Range("G17") = "2222222222"
ElseIf Range("D8") <= 240 Then Range("F17") = "3"
Range("G17") = "2222222222"
ElseIf Range("D8") <= 320 Then Range("F17") = "4"
Range("G17") = "2222222222"
ElseIf Range("D8") <= 400 Then Range("F17") = "5"
Range("G17") = "2222222222"
Else
Range("F17").Value = ""
Range("G17").Value = ""
End If
End Sub]
[Private Sub CheckBox5_Click()
If CheckBox5.Value = True Then
CheckBox6.Value = False
ElseIf Range("D8") <= 82 Then Range("F16") = "1"
Range("G16") = "1111111111"
ElseIf Range("D8") <= 164 Then Range("F16") = "2"
Range("G16") = "1111111111"
ElseIf Range("D8") <= 240 Then Range("F16") = "3"
Range("G16") = "1111111111"
ElseIf Range("D8") <= 320 Then Range("F16") = "4"
Range("G16") = "1111111111"
ElseIf Range("D8") <= 400 Then Range("F16") = "5"
Range("G16") = "1111111111"
Else
Range("F16").Value = ""
Range("G16").Value = ""
End If
End Sub
Private Sub CheckBox6_Click()
If CheckBox6.Value = True Then
CheckBox5.Value = False
ElseIf Range("D8") <= 82 Then Range("F17") = "1"
Range("G17") = "2222222222"
ElseIf Range("D8") <= 164 Then Range("F17") = "2"
Range("G17") = "2222222222"
ElseIf Range("D8") <= 240 Then Range("F17") = "3"
Range("G17") = "2222222222"
ElseIf Range("D8") <= 320 Then Range("F17") = "4"
Range("G17") = "2222222222"
ElseIf Range("D8") <= 400 Then Range("F17") = "5"
Range("G17") = "2222222222"
Else
Range("F17").Value = ""
Range("G17").Value = ""
End If
End Sub]