PORCHER
XLDnaute Occasionnel
Bonjour mes amis,
J'ai besoin de vous pour m'aider à trouver une solution suivant la macro ci-dessous
Je suis persuader qu'il y a plus simple pour formuler
Merci et très cordialement
J'ai besoin de vous pour m'aider à trouver une solution suivant la macro ci-dessous
Je suis persuader qu'il y a plus simple pour formuler
VB:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim Plage1, Plage2, Plage3, Plage4, Plage5, Plage6, Plage7, Plage8, Plage9, Plage10 As Range
Set Plage1 = ActiveSheet.Range("C4:L4")
Set Plage2 = ActiveSheet.Range("C7:L7")
Set Plage3 = ActiveSheet.Range("C9:L9")
Set Plage4 = ActiveSheet.Range("C11:L11")
Set Plage5 = ActiveSheet.Range("C13:L13")
Set Plage6 = ActiveSheet.Range("C15:L15")
Set Plage7 = ActiveSheet.Range("C18:L18")
Set Plage8 = ActiveSheet.Range("C20:L20")
Set Plage9 = ActiveSheet.Range("C22:L22")
Set Plage10 = ActiveSheet.Range("C24:L24")
'Création de la première règle
With Plage1.Font: .Name = "Arial": .Size = 10: .Bold = True: .ColorIndex = 3: End With
With Plage2.Font: .Name = "Arial": .Size = 10: .Bold = True: .ColorIndex = 3: End With
With Plage3.Font: .Name = "Arial": .Size = 10: .Bold = True: .ColorIndex = 3: End With
With Plage4.Font: .Name = "Arial": .Size = 10: .Bold = True: .ColorIndex = 3: End With
With Plage5.Font: .Name = "Arial": .Size = 10: .Bold = True: .ColorIndex = 3: End With
With Plage6.Font: .Name = "Arial": .Size = 10: .Bold = True: .ColorIndex = 3: End With
With Plage7.Font: .Name = "Arial": .Size = 10: .Bold = True: .ColorIndex = 3: End With
With Plage8.Font: .Name = "Arial": .Size = 10: .Bold = True: .ColorIndex = 3: End With
With Plage9.Font: .Name = "Arial": .Size = 10: .Bold = True: .ColorIndex = 3: End With
With Plage10.Font: .Name = "Arial": .Size = 10: .Bold = True: .ColorIndex = 3: End With
End Sub