RawlinsCross
Active Member
- Joined
- Sep 9, 2016
- Messages
- 437
Sheepish of putting this out but I can't really figure this out. I have a several dozen labels on a userform in which a calculated value is placed. I have an IF statement that either enters a "-" or a value based on some criteria and I'd like to turn the font color red. But I've having trouble with this supposedly easy task:
*Forgive the partial code*
*Forgive the partial code*
Code:
dFinalScore = Format((AvgArray(1) - AvgArray(lNumSections)) / (AvgArray(lNumSections) + 0.000000000001) * 100, "0")
If (lColNdx = 0 Or Abs(dFinalScore) < TextBox1.Value Or Abs(dFinalScore) > 1000) Then
ctrl.Caption = "-"
Else
ctrl.Caption = dFinalScore & "%"
ctrl.Caption.ForeColor = vbRed 'THIS IS THE PART THAT DOESN'T WORK
Erase AvgArray
lColNdx = 0
End If