R
RICKET
Guest
Bonjour Forum,
J'ai renseigné ce code en évenementielle, et le message d'erreur 'incompatibilité de type Erreur 13' m'est retourné,
L'un d'entre vous aurait-il la bonté de regarder d'où peut venir mon problème ?
Merci d'avance
Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
Dim c As Range
For Each c In Range('A3:B500')
Select Case c.Value
Case Is = ''
c.Interior.ColorIndex = 0
Case Is = 'd'
c.Interior.ColorIndex = 12
c.Font.ColorIndex = 12
Case Is = 'D'
c.Interior.ColorIndex = 12
c.Font.ColorIndex = 12
Case Is = 'f'
c.Interior.ColorIndex = 15
c.Font.ColorIndex = 15
Case Is = 'F'
c.Interior.ColorIndex = 15
c.Font.ColorIndex = 15
Case Is = 'c'
c.Interior.ColorIndex = 36
c.Font.ColorIndex = 36
Case Is = 'C'
c.Interior.ColorIndex = 36
c.Font.ColorIndex = 36
Case Is = 'h'
c.Interior.ColorIndex = 7
c.Font.ColorIndex = 7
Case Is = 'H'
c.Interior.ColorIndex = 7
c.Font.ColorIndex = 7
End Select
Next
End Sub
J'ai renseigné ce code en évenementielle, et le message d'erreur 'incompatibilité de type Erreur 13' m'est retourné,
L'un d'entre vous aurait-il la bonté de regarder d'où peut venir mon problème ?
Merci d'avance
Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
Dim c As Range
For Each c In Range('A3:B500')
Select Case c.Value
Case Is = ''
c.Interior.ColorIndex = 0
Case Is = 'd'
c.Interior.ColorIndex = 12
c.Font.ColorIndex = 12
Case Is = 'D'
c.Interior.ColorIndex = 12
c.Font.ColorIndex = 12
Case Is = 'f'
c.Interior.ColorIndex = 15
c.Font.ColorIndex = 15
Case Is = 'F'
c.Interior.ColorIndex = 15
c.Font.ColorIndex = 15
Case Is = 'c'
c.Interior.ColorIndex = 36
c.Font.ColorIndex = 36
Case Is = 'C'
c.Interior.ColorIndex = 36
c.Font.ColorIndex = 36
Case Is = 'h'
c.Interior.ColorIndex = 7
c.Font.ColorIndex = 7
Case Is = 'H'
c.Interior.ColorIndex = 7
c.Font.ColorIndex = 7
End Select
Next
End Sub