Light up multiple listbox rows?

I have a listbox where I need to check against multiple conditions being true.

This works to light 1 row that matches a name variable called ydna(primary):

[code] dim nam as string
dim nam2 as string

if row < me.ListCount then
nam = me.cell(row,0)
nam2 = Mid(nam, Instr(nam, ": ") + 2)
If nam2 = ydna(primary) then
g.ForeColor = &c324F17
g.FillRect(0, 0, g.Width, g.Height)
end if
end if[/code]

How do i change this where multiple rows might be true? For example, I need to check here for names matching ydna(1), ydna(2), ydna(3) and ydna(4) and light those row(s) green.

You mean…

if ydna.IndexOf( nam2 ) <> -1 then

Cool, it appears for now that did the trick. Thanks, Kem!

Depending on how many values you have in ydna, you might consider a Dictionary instead of an array. If you have less than, say, 20 to 40 values, it probably won’t make a difference. (I came up with “20 to 40” off the top of my head. You’d have to test.)