By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,747 Members | 1,349 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,747 IT Pros & Developers. It's quick & easy.

Select Case

P: n/a
I have a Combo1 with 254 items in it. I need to divide it into 2 case
statements:

Case 0 thru 246

and

Case 247 thru 253

Mastering Visual Basic .Net, Page 139, very bottom of the page states:
Same case statements can be followed by multiple values, which are
separated by commas.

Surely there is a shortcut way of expressing the 247 values in Case 0
above.
How do I show the case values without listing all 247 of them?

Thanks in advance, Jim.

Oct 22 '07 #1
Share this Question
Share on Google+
6 Replies


P: n/a

"Jim Richards" <ji*********@satx.rr.comwrote in message
news:47***********************@roadrunner.com...
>I have a Combo1 with 254 items in it. I need to divide it into 2 case
statements:

Case 0 thru 246

and

Case 247 thru 253

Mastering Visual Basic .Net, Page 139, very bottom of the page states:
Same case statements can be followed by multiple values, which are
separated by commas.

Surely there is a shortcut way of expressing the 247 values in Case 0
above.
How do I show the case values without listing all 247 of them?

Thanks in advance, Jim.
Case 0 to 246 and case 247 to 253
http://msdn2.microsoft.com/en-us/lib...4y(VS.71).aspx

Hope this helps
LS

Oct 22 '07 #2

P: n/a
Why not do smoething like this

intValue = FunctionCall( parms )

Select Case intResult

Case Is >= 75 AND Case Is <90
'bla
Case Is < 65
'bla
Case Else
'bla
End Select
Can you psuedocode something that your looking for?

Miro
Jim Richards wrote:
I have a Combo1 with 254 items in it. I need to divide it into 2 case
statements:

Case 0 thru 246

and

Case 247 thru 253

Mastering Visual Basic .Net, Page 139, very bottom of the page states:
Same case statements can be followed by multiple values, which are
separated by commas.

Surely there is a shortcut way of expressing the 247 values in Case 0
above.
How do I show the case values without listing all 247 of them?

Thanks in advance, Jim.
Oct 22 '07 #3

P: n/a
On Oct 22, 12:08 pm, "Lloyd Sheen" <a...@b.cwrote:
"Jim Richards" <jimricha...@satx.rr.comwrote in message

news:47***********************@roadrunner.com...
I have a Combo1 with 254 items in it. I need to divide it into 2 case
statements:
Case 0 thru 246
and
Case 247 thru 253
Mastering Visual Basic .Net, Page 139, very bottom of the page states:
Same case statements can be followed by multiple values, which are
separated by commas.
Surely there is a shortcut way of expressing the 247 values in Case 0
above.
How do I show the case values without listing all 247 of them?
Thanks in advance, Jim.

Case 0 to 246 and case 247 to 253http://msdn2.microsoft.com/en-us/library/cy37t14y(VS.71).aspx

Hope this helps
LS
Thought you could do greater than less than in case statements too.
Case Is < 247 ?

Oct 22 '07 #4

P: n/a
"Jim Richards" wrote:
I have a Combo1 with 254 items in it. I need to divide it into 2 case
statements:

Case 0 thru 246

and

Case 247 thru 253

Mastering Visual Basic .Net, Page 139, very bottom of the page states:
Same case statements can be followed by multiple values, which are
separated by commas.

Surely there is a shortcut way of expressing the 247 values in Case 0
above.
How do I show the case values without listing all 247 of them?

Thanks in advance, Jim.

Please highlight the 'Select' statement and press F1.
Oct 22 '07 #5

P: n/a
<ge*******@otc.eduschrieb:
Thought you could do greater than less than in case statements too.
Case Is < 247 ?
ACK, but note that -100 will also pass in this case.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Oct 22 '07 #6

P: n/a
Jim Richards schreef:
I have a Combo1 with 254 items in it. I need to divide it into 2 case
statements:

Case 0 thru 246

and

Case 247 thru 253

Mastering Visual Basic .Net, Page 139, very bottom of the page states:
Same case statements can be followed by multiple values, which are
separated by commas.

Surely there is a shortcut way of expressing the 247 values in Case 0
above.
How do I show the case values without listing all 247 of them?

Thanks in advance, Jim.
In this case I would just use an if.
--
Rinze van Huizen
C-Services Holland b.v
Oct 24 '07 #7

This discussion thread is closed

Replies have been disabled for this discussion.