OVH Cloud OVH Cloud

mise en forme

1 réponse
Avatar
Emile
Bonjour,

J'ai créé ce code et j'aimerais qu'il s'exécute lors de la saisie dans un
champ, mais je ne n'arrive pas à l'intégrer, un manuel il fonctionne, mais
pas dans la feuille Worksheet_Change

Select Case ActiveCell

Case Is = 1
txt_pri = "1-Prioritaire"
NoColor = 3
Case Is = 2
txt_pri = "2-Très Urgent"
NoColor = 6
Case Is = 3
txt_pri = "3-Urgent"
NoColor = 6
Case Is = 4
txt_pri = "4-Normal"
NoColor = 3
Case Is = 5
txt_pri = "5-Différé"
NoColor = 5
End Select

With Selection.Interior
.ColorIndex = 0
.Pattern = xlLightUp
.PatternColorIndex = NoColor
End With

merci de votre aide et salutations

1 réponse

Avatar
Daniel
Bonjour.
Select Case Target.Value
Cordialement.
Daniel
"Emile" a écrit dans le message de news:

Bonjour,

J'ai créé ce code et j'aimerais qu'il s'exécute lors de la saisie dans un
champ, mais je ne n'arrive pas à l'intégrer, un manuel il fonctionne, mais
pas dans la feuille Worksheet_Change

Select Case ActiveCell

Case Is = 1
txt_pri = "1-Prioritaire"
NoColor = 3
Case Is = 2
txt_pri = "2-Très Urgent"
NoColor = 6
Case Is = 3
txt_pri = "3-Urgent"
NoColor = 6
Case Is = 4
txt_pri = "4-Normal"
NoColor = 3
Case Is = 5
txt_pri = "5-Différé"
NoColor = 5
End Select

With Selection.Interior
.ColorIndex = 0
.Pattern = xlLightUp
.PatternColorIndex = NoColor
End With

merci de votre aide et salutations