|
-
September 13th, 2001, 02:44 PM
#1
IN or INLIST in VB???
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?
-
September 13th, 2001, 04:17 PM
#2
Re: IN or INLIST 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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|