Resolved: converting flexgrid text
I am trying to convert the text in a flexgrid to an integer so i can test it against a condition.
Basically, i want any cell in Col(1) with a value >=2 to be coloured red. I think the looping construct is ok as it worked fine when i changed the colour based on the text value so i must be doing something wrong with my conversion function.
can anyone help?
For i = 1 To fgMonthA3rd.Rows - 1
fgMonthA3rd.Row = i
For j = 1 To fgMonthA3rd.Cols - 1
fgMonthA3rd.Col = j
Do
'Absences is a string
Absences = fgMonthA3rd.Text
'NumAbs is an Integer
NumAbs = CInt(Absences)
If NumAbs >= 2 Then
fgMonthA3rd.CellBackColor = vbRed
End If
Loop Until fgMonthA3rd.Cols <> 1
Next j
Next i