L
Luc
Guest
Bonjour le forum,
Dans le code suivant, j'ai une boucle sans fin qui se produit et je ne sais pas comment l'arrêter sauf avec le population Ctrl + alt + suppr :
Function ColorCountIf(SearchArea As Object, BgColor As Range) As Integer
Application.Volatile True
ColorCountIf = 0
MaCoul = BgColor.Interior.ColorIndex
For Each Cell In SearchArea
If Cell.Interior.ColorIndex = MaCoul Then ColorCountIf = ColorCountIf + 1
Next Cell
End Function
Quelqu'un pourrait m'aider à corriger cela ?
Merci
Dans le code suivant, j'ai une boucle sans fin qui se produit et je ne sais pas comment l'arrêter sauf avec le population Ctrl + alt + suppr :
Function ColorCountIf(SearchArea As Object, BgColor As Range) As Integer
Application.Volatile True
ColorCountIf = 0
MaCoul = BgColor.Interior.ColorIndex
For Each Cell In SearchArea
If Cell.Interior.ColorIndex = MaCoul Then ColorCountIf = ColorCountIf + 1
Next Cell
End Function
Quelqu'un pourrait m'aider à corriger cela ?
Merci