Results 1 to 3 of 3

Thread: Resolved: converting flexgrid text

Threaded View

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2003
    Posts
    6

    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
    Last edited by dcahill; Mar 5th, 2003 at 07:35 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width