if command

J

Joel

Right now this says if windowrating = 20.

If Item.UserProperties("WindowRating") = "20" Then

How can I make is say if windowrating contains 20? So if window rating = 20,45,60, then it would be true. I just don't know the syntax.

Thanks for your help - Joel
 
K

Ken Slovak - [MVP - Outlook]

For a string value? Look at the Help on the InStr function. For example:
If InStr(1, Item.UserProperties("WindowRating") ,"20") > 0 Then
' "20" is in the string. Return value of InStr is the position in
the string




Right now this says if windowrating = 20.
If Item.UserProperties("WindowRating") = "20" Then
How can I make is say if windowrating contains 20? So if window rating =
20,45,60, then it would be true. I just don't know the syntax.

Thanks for your help - Joel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top