Hi,
Is there a keyword similar to IN or INLIST in VB?
For example, in SQL you have:
SELECT * FROM table WHERE col IN(5,7,13,18);
So, intead of having:
If x=2 or x=8 or x=12 etc. .....
you could have:
if x IN(2,8,12)
is there such a thing in VB?
Printable View
Hi,
Is there a keyword similar to IN or INLIST in VB?
For example, in SQL you have:
SELECT * FROM table WHERE col IN(5,7,13,18);
So, intead of having:
If x=2 or x=8 or x=12 etc. .....
you could have:
if x IN(2,8,12)
is there such a thing in VB?
VB doesn't have this command, but you a select case can do this.
Select case SomeValue
Case 1, 4, 6 to 10, 12 ,13
Msgbox "Somevalue is 1, 4, 6, 7, 8, 9, 10, 12 or 13"
End Select
Tom Cannaerts
[email protected]
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning -- Rich Cook