Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21842

[RESOLVED] Select Case 0?

$
0
0
I'm trying to determine if a string contains a specific piece of text. If it does, then I need to change the forecolor of a ListItem to a predefined color. This is how I'm trying to do it, but nothing happens. No errors or anything.

Code:

Dim Found
    Select Case Found <> 0
        Case Found = InStr(1, thisPlate.plate, "Sex Offender")
            itm.ForeColor = &HFF&
    End Select

I could define a ton of variables and use IFs to figure it out, but I want to make it easier for me with Select Case.

Any ideas?

*EDIT: Never mind. It works. The condition I was checking was wrong.

Viewing all articles
Browse latest Browse all 21842

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>