Click to See Complete Forum and Search --> : select case
rod sa
Nov 8th, 1999, 04:24 AM
translate code into the equivalent select case statement and why!
if num1=3 then
num2=5
elseif num1=10 then
num2=6
elseif num1>=15 and num1 <=20 then
num2=8
elseif num1>25 then
num2 =10
else num2=30
end if
Gimpster
Nov 8th, 1999, 04:27 AM
What exactly is your question? What do you need help with?
------------------
Ryan
corneslen@hotmail.com
ICQ# 47799046
QWERTY
Nov 8th, 1999, 04:41 AM
Rod Sa is doing his/her homework!!!!!!!!!!
------------------
Visual Basic Programmer (at least I want to be one)
------------------
PolComSoft
You will hear a lot about it.
Gimpster
Nov 8th, 1999, 04:42 AM
That's what I kinda figured. But, hey, why not help him out. That's what this forum is all about, right? Helping other people learn Visual Basic.
------------------
Ryan
corneslen@hotmail.com
ICQ# 47799046
[This message has been edited by Gimpster (edited 11-08-1999).]
MartinLiss
Nov 8th, 1999, 04:43 AM
Select Case True
Case num1 = 3
num2 = 5
Case num1 = 10
num2 = 6
Case num1 >= 15 And num1 <= 20
num2 = 8
Case num1 > 25
num2 = 10
Case Else
num2 = 30
End Select
Because it's clearer and easier to maintain.
------------------
Marty
[This message has been edited by MartinLiss (edited 11-08-1999).]
rod sa
Nov 8th, 1999, 04:46 AM
Hey guys/gals, I need help with this stuff. Apparently I didn't learn it in class!
Thanx
QWERTY
Nov 8th, 1999, 04:47 AM
But don't just ask us to do your homework. Use VB help if you have VB, use your books, that's kind of what I'm doing
------------------
Visual Basic Programmer (at least I want to be one)
------------------
PolComSoft
You will hear a lot about it.
MartinLiss
Nov 8th, 1999, 06:29 AM
I have no problem at all with someone asking an occasional homework question in this forum. The people who bug me are those who can't be bothered to use Help and instead ask question after question. I also don't really know why it is, but these same people (who seem to be native-english speakers) usually can't spell or construct a proper sentence!
------------------
Marty
[This message has been edited by MartinLiss (edited 11-08-1999).]
Bob Baddeley
Nov 8th, 1999, 06:38 AM
Another thing that bothers me is when they post something without doing ANY research at all. Usually that question has already been addressed somewhere else on the forum and they are too lazy to find it and don't care about wasting other people's time.
billwagnon
Nov 8th, 1999, 08:14 AM
What bothers me is when people use the forum to complain about other peo...
oh never mind!
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.