simple if statement question

human_anomaly

Registered User.
Local time
Today, 15:46
Joined
Apr 12, 2004
Messages
69
Ok I know that this question is a really simple one, but i've been fiddling with the code for about 10 min and haven't found a solution. I am trying to make an if statement with many or's in it. Here is the code that I have been trying to get to work:

If ((Test1.Value Or Test2.Value Or Test3.Value Or Test4.Value) = 1 Or 2) Then

it always thinks it true like this, I've tried putting parenthases around 1 or 2 but then it always thinks its false. Can somone please help me out.
 
If Test1.Value = 1 or _
Test1.Value = 2 or _
Test2.Value = 1 or _
Test2.Value = 2 or _
Test3.Value = 1 or _
Test3.Value = 2 Then

???
kh
 
ya, i've put that in and it works. I was just looking for somthing a little more compact. Any ideas
 
I think that's 'bout as good as it gets...

kh
 

Users who are viewing this thread

Back
Top Bottom