Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
If Target.Count > 1 Or Intersect(Target, Range("D4")) Is Nothing Then Exit
Sub
If Target = "Guy" Then
Range(Cells(Target.Row, 4), Cells(Target.Row,
4)).Interior.ColorIndex = 16
Range(Cells(Target.Row, 4), Cells(Target.Row, 4)).Font.ColorIndex =
16
Exit Sub
End If
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range) If Not Intersect(Target, [d4]) Is Nothing Then With [d4] .Interior.ColorIndex = IIf(UCase(.Value) = "GUY", 16, xlNone) .Font.ColorIndex = IIf(UCase(.Value) = "GUY", 16, xlAutomatic) End With End If End Sub
Fredo P a écrit :
Roh!! Les monstres comme disait mon Gd_père "Modeste" a écrit dans le message de news:
Bonsour® Fredo P avec ferveur ;o))) vous nous disiez :
With Target .Interior.ColorIndex = IIf(.Value="Guy",16, xlNone) .Font.ColorIndex = IIf(.Value="Guy",16, xlNone) End With
..celui-ci fonctionne:
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
If Not Intersect(Target, [d4]) Is Nothing Then
With [d4]
.Interior.ColorIndex = IIf(UCase(.Value) = "GUY", 16, xlNone)
.Font.ColorIndex = IIf(UCase(.Value) = "GUY", 16, xlAutomatic)
End With
End If
End Sub
Fredo P a écrit :
Roh!! Les monstres comme disait mon Gd_père
"Modeste" <nomail@nomail.net> a écrit dans le message de news:
Oeo61GpHJHA.2408@TK2MSFTNGP04.phx.gbl...
Bonsour® Fredo P avec ferveur ;o))) vous nous disiez :
With Target
.Interior.ColorIndex = IIf(.Value="Guy",16, xlNone)
.Font.ColorIndex = IIf(.Value="Guy",16, xlNone)
End With
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range) If Not Intersect(Target, [d4]) Is Nothing Then With [d4] .Interior.ColorIndex = IIf(UCase(.Value) = "GUY", 16, xlNone) .Font.ColorIndex = IIf(UCase(.Value) = "GUY", 16, xlAutomatic) End With End If End Sub
Fredo P a écrit :
Roh!! Les monstres comme disait mon Gd_père "Modeste" a écrit dans le message de news:
Bonsour® Fredo P avec ferveur ;o))) vous nous disiez :
With Target .Interior.ColorIndex = IIf(.Value="Guy",16, xlNone) .Font.ColorIndex = IIf(.Value="Guy",16, xlNone) End With
Fredo P
"LSteph" a écrit dans le message de news: %
la fils c'est rho..ger la fille rha..maya
;o)
Elle bonne celle la!! OO))
"LSteph" <lecocosteph@frite.fr> a écrit dans le message de news:
%23J2jnn0HJHA.3624@TK2MSFTNGP05.phx.gbl...