2
If CDbl(totalAverage) >= 89 Then
            lblGrade.Text = "A"
        ElseIf CDbl(totalAverage) >= 79 Then
            lblGrade.Text = "B"
        ElseIf CDbl(totalAverage) >= 69 Then
            lblGrade.Text = "C"
        ElseIf CDbl(totalAverage) >= 59 Then
            lblGrade.Text = "D"
        ElseIf CDbl(totalAverage) >= 0 Then
            lblGrade.Text = "F"
        End If

Just trying to change the colors of the text to green for an A, B, or C. Orange for a D, and red for an F.

I was thinking it was lblGrade.Text.Color or something like that; however, that didn't seem to be a command and I've been looking around and was having trouble finding the answer to this and thought it would be easier to just ask here. Thanks for the help

jruder
  • 67
  • 2
  • 2
  • 5

1 Answers1

3

lblGrade.Forecolor is what your looking for.

For orange, it would be "lblGrade.ForeColor = Color.Orange"

Gavin Perkins
  • 685
  • 1
  • 9
  • 28