maninwhite
XLDnaute Occasionnel
Bonjour à toutes et à tous
Je reviens sur le forum afin d'obtenir la simplification du code suivant.
Ce code me permet de colorer des formes automatiques suivant la valeur d'une cellule.
Merci
Je reviens sur le forum afin d'obtenir la simplification du code suivant.
Ce code me permet de colorer des formes automatiques suivant la valeur d'une cellule.
Merci
Code:
Worksheets("Stats FY 1314").Activate
With Worksheets("Stats FY 1314")
If Range("B93").Value >= 1 Then
ActiveSheet.Shapes("tete").DrawingObject.Interior.ColorIndex = 3
Else: ActiveSheet.Shapes("Oval 8").DrawingObject.Interior.ColorIndex = 4
End If
If Range("B94").Value >= 1 Then
ActiveSheet.Shapes("oeild").DrawingObject.Interior.ColorIndex = 3
Else: ActiveSheet.Shapes("oeild").DrawingObject.Interior.ColorIndex = 4
End If
If Range("B95").Value >= 1 Then
ActiveSheet.Shapes("oeilg").DrawingObject.Interior.ColorIndex = 3
Else: ActiveSheet.Shapes("oeilg").DrawingObject.Interior.ColorIndex = 4
End If
If Range("B96").Value >= 1 Then
ActiveSheet.Shapes("cou").DrawingObject.Interior.ColorIndex = 3
Else: ActiveSheet.Shapes("cou").DrawingObject.Interior.ColorIndex = 4
End If
If Range("B97").Value >= 1 Then
ActiveSheet.Shapes("epauleD").DrawingObject.Interior.ColorIndex = 3
Else: ActiveSheet.Shapes("epauleD").DrawingObject.Interior.ColorIndex = 4
End If
End With