I'm trying to replace a cumbersome multiple OR statement with an IN statement, but it is erroring out (in A2K).
Instead of this code:
I'd like to use this code:
The IN statement gives me a Compile Error 'Expected: Then or GoTo'. Can someone tell me what is wrong with my IN statement?
Thanks,
Sup
Instead of this code:
Code:
If str = "A" OR str = "B" OR str = "C" OR str = "AB" OR str = "BC" Then
'do stuff
End If
I'd like to use this code:
Code:
IF str IN ("A", "B", "C", "AB, "AC") Then
'do stuff'
End If
The IN statement gives me a Compile Error 'Expected: Then or GoTo'. Can someone tell me what is wrong with my IN statement?
Thanks,
Sup