Erreur d'exécution '5'
Résolu
Barnaud85
Messages postés
2
Date d'inscription
Statut
Membre
Dernière intervention
-
Barnaud85 Messages postés 2 Date d'inscription Statut Membre Dernière intervention -
Barnaud85 Messages postés 2 Date d'inscription Statut Membre Dernière intervention -
Bonsoir, j'aimerais créer un programme VBA assez simple, mais une erreur lors du lancement du programme apparaît ("Erreur d'exécution '5' : Argument ou appel de procédure incorrect"). Pourriez-vous m'aider ?
Voici mon code :
ligne = ActiveCell.Row
Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=Cells(ligne, 12)>Cells(ligne, 10)"
Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority
With Selection.FormatConditions(1).Interior
.PatternColorIndex = xlAutomatic
.Color = 65535
.TintAndShade = 0
End With
Selection.FormatConditions(1).StopIfTrue = False
Merci d'avance pour votre aide.
Voici mon code :
ligne = ActiveCell.Row
Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=Cells(ligne, 12)>Cells(ligne, 10)"
Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority
With Selection.FormatConditions(1).Interior
.PatternColorIndex = xlAutomatic
.Color = 65535
.TintAndShade = 0
End With
Selection.FormatConditions(1).StopIfTrue = False
Merci d'avance pour votre aide.
A voir également:
- Erreur d'execution 5
- +33 5 68 20 76 67 ✓ - Forum Mobile
- Erreur 3005 france tv - Forum TV & Vidéo
- Erreur 3000 france tv - Forum Lecteurs et supports vidéo
- Erreur t32 ✓ - Forum Livebox
- Erreur 0x80070643 - Accueil - Windows
1 réponse
Bonjour,
remplacez
par
remplacez
Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _ "=Cells(ligne, 12)>Cells(ligne, 10)"
par
Selection.FormatConditions.Add Type:=xlExpression, Formula1:="=L" & ligne & ">J" & ligne & ""
Barnaud85
Messages postés
2
Date d'inscription
Statut
Membre
Dernière intervention
C'est parfait, merci beaucoup ! :)