Click to See Complete Forum and Search --> : extremely simple SELECT CASE question


ronnie99
11-05-2003, 02:41 AM
hiya :)

i'm having trouble performing a very simple VBScript Select Case statement.
to simplify, i need to have something like this:


select case somestring
case "one"
do something
case "two"
do something else
case ""
do nothing!
case else
do something else altogether
end select



i'm having a syntax/understanding(?) problem with DO NOTHING?
there's no such thing as exit select and end select ain't right either... of course there are many solutions, but i'm looking for the most effective, which would be to simply end the select with no action in case that somestring="" .

i can't perform the case else unless i check to see that it's not empty.


any help?
10x, r. ;)

rdoekes
11-05-2003, 04:10 PM
no statements following the Case "" should do the trick. You do not have to enter statements.

ronnie99
11-06-2003, 08:38 AM
woopsy,

i forgot to append an "" to the string var.
(been checking a NULL all that time)...


thanks, r. :)