Listbox CellBackgroundPaint

I’m having trouble changing the background color of listbox rows. I’ve seen how to alternate the background color of each row (mod 2 = 0), but I am wanting to alternate every second row. For example…

Row 1 …GREY
Row 2…GREY
Row 3…WHITE
Row 4…WHITE
Row 5 …GREY
Row 6…GREY
Row 7…WHITE
Row 8…WHITE
Row 9 …GREY
Row 10…GREY
Row 11…WHITE
Row 12…WHITE

If (row \ 2) Mod 2 = 0 Then
  'grey
Else
  'white
End If
1 Like

Perfect. Thanks Julian.

1 Like