zachvaldez
asked on
changing msflexgrid row to a different color if the number displays negative.
Since I was able to display negative numbers in an msflexgrid,
I would also like to display it in red for that row. How to do that?
Part of the code I'd like to insert the code... to change row color if negative
With grdEquipData
'Check if "Cost" and "Qty" are available
If (Trim(.TextArray(.row * .Cols + 7)) <> "" And Trim(.TextArray(.row * .Cols + 3)) <> "") Then
'Total Cost = Unit Cost * Qty
.TextArray(.row * .Cols + 8) = FormatNumber((.TextArray(. row * .Cols + 3)) * Val((.TextArray(.row * .Cols + 7))), 2)
End If
end with
I would also like to display it in red for that row. How to do that?
Part of the code I'd like to insert the code... to change row color if negative
With grdEquipData
'Check if "Cost" and "Qty" are available
If (Trim(.TextArray(.row * .Cols + 7)) <> "" And Trim(.TextArray(.row * .Cols + 3)) <> "") Then
'Total Cost = Unit Cost * Qty
.TextArray(.row * .Cols + 8) = FormatNumber((.TextArray(.
End If
end with
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
i'd like the row to display color red...
.TextArray(.row * .Cols + 8) = FormatNumber((.TextArray(.