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:
Dim lrow, lcol As Integer Dim lcolor As String With MSFlexGrid1 For lrow = .FixedRows To .Rows .Row = lrow If UCase(.TextMatrix(lrow, 1)) = "BREAK" Then lcolor = vbGreen For lcol = 0 To 1 .Col = lcol .CellBackColor = lcolor Next lcol ElseIf .CellBackColor <> vbGreen Then lcolor = vbRed End If Next lrow End With
It goes into an infinity loop and crashes the IDE.




Reply With Quote