I have a column and I want to paint it certain colors depending on the text.

I found some code and tried to recycle it but that didnt work... Here is the code
VB Code:
  1. Dim lrow, lcol As Integer
  2.     Dim lcolor As String
  3.    
  4.         With MSFlexGrid1
  5.                 For lrow = .FixedRows To .Rows
  6.                     .Row = lrow
  7.                     If UCase(.TextMatrix(lrow, 1)) = "BREAK" Then
  8.                         lcolor = vbGreen
  9.                         For lcol = 0 To 1
  10.                             .Col = lcol
  11.                             .CellBackColor = lcolor
  12.                         Next lcol
  13.                     ElseIf .CellBackColor <> vbGreen Then
  14.                         lcolor = vbRed
  15.                     End If
  16.                 Next lrow
  17.         End With

It goes into an infinity loop and crashes the IDE.