1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
| '*** CODE PREMIERE LETTRE MAJUSCULE GRAS et ROUGE ZONE G2:H27
Private Sub Worksheet_Change(ByVal Target As Range)
With Target
If Not Intersect(Target, [G2:H27]) Is Nothing Then
If .Count <> 1 Then Exit Sub
Application.EnableEvents = False
.Font.ColorIndex = 1
.Font.Bold = False
With Target.Characters(1, 1)
.Font.ColorIndex = 3
.Font.Bold = True
.Text = UCase(.Text)
End With
Application.EnableEvents = True
End If
If Not Intersect(Target, [G2:H27]) Is Nothing And .Count = 1 Then
If Target = "" Then
.Font.ColorIndex = 1
.Font.Bold = False
End If
End If
End With
End Sub |
Partager