Bonsoir, Bien vu pour la conversion en Integer.
Seulement il faudra faire attention aux cellules qui peuvent être vides.(sans parler du fait que le contenu ne peut être que des chiffres)
CInt("") **==>Erreur !
Deux solutions au choix :
-Avant de comparer
1° On Error Resume Next tout au début.
2° Ou bien instaurer un test
Dim iPnt As Integer
For iPnt = 1 To MSHFlexGrid.Rows - 1
MSHFlexGrid.Row = iPnt
If (MSHFlexGrid.TextMatrix(iPnt, 4)) <>"" And _(MSHFlexGrid.TextMatrix(iPnt, 5))<>"" Then
If CInt(MSHFlexGrid.TextMatrix(iPnt, 4)) <= CInt(MSHFlexGrid.TextMatrix(iPnt, 5)) Then
MSHFlexGrid.Col = 4
MSHFlexGrid.CellForeColor = &HFF&
End If
End If
Next
... Y'en a même qui disent qu'ils l'ont vu voler.