Format Equals or less than Color Listbox


I have a column with value numbers, I want to make a rule, If the values on column 9 are equal or less than 0, so change color in “red”.
For this, I’m using this, It works, but when I resize the table, it colors the entire column:

if Column = 9 then
if Val(me.Cell(Row, Column)) <= 0 then
g.ForeColor = rgb(255,0,0)

       g.ForeColor = &c000000



What Am I doing wrong?


in this in CelltextPaint?

Yes it is in CellTextPaint

It should work

I resolve it, like the last time that I had issues formatting to currency. Using “CellTAG” instead of Cell