Link to home
Start Free TrialLog in
Avatar of zachvaldez
zachvaldezFlag for United States of America

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
ASKER CERTIFIED SOLUTION
Avatar of Dirk Haest
Dirk Haest
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of zachvaldez

ASKER

only when it is negative number though..
i'd like the row to display color red...
.TextArray(.row * .Cols + 8) = FormatNumber((.TextArray(.row * .Cols + 3)) * Val((.TextArray(.row * .Cols + 7))), 2)