Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

select case

2 views
Skip to first unread message

Brett Halligan

unread,
Aug 12, 2001, 5:06:32 PM8/12/01
to
I believe in vbscript you cannot use the select case statment

is there any other way
that I can convert
somthing like ...

select case strTemp
case "A" to "Z"
blnCorrect = true
case else
blnCorrect = false
end select

into a if then else without
going if strTemp = "A" or strTemp = "B" or strTemp = "C" or ...

thanks in advance


-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 80,000 Newsgroups - 16 Different Servers! =-----

Gary Clemans-Gibbon

unread,
Aug 12, 2001, 6:10:32 PM8/12/01
to
I use select case all the time in my vbscripts. where did you get the idea
that you can't?

"Brett Halligan" <ngpos...@yahoo.com> wrote in message
news:nfrdntchd4cocgi8i...@4ax.com...

Brett Halligan

unread,
Aug 12, 2001, 6:26:27 PM8/12/01
to
On Sun, 12 Aug 2001 23:10:32 +0100, "Gary Clemans-Gibbon"
<garycg...@angryrhino.com> wrote:


erm msdn didnt dislplay it
I must have looked in the wrong place, thanks :)

Michael Harris (MVP)

unread,
Aug 12, 2001, 7:15:28 PM8/12/01
to
select case True
case (strTemp >= "A" And strTemp <= "Z")

blnCorrect = true
case else
blnCorrect = false
end select


--
Michael Harris
Microsoft.MVP.Scripting
--
mik...@mvps.org
Please do not email questions - post them to the newsgroup instead.
--

"Brett Halligan" <ngpos...@yahoo.com> wrote in message
news:nfrdntchd4cocgi8i...@4ax.com...

Torgeir Bakken

unread,
Aug 12, 2001, 5:24:41 PM8/12/01
to
Who told you that !

This is completely legal in VBScript:

Select Case <testexpression>
Case <expressionlist>
<statementblock-1>
Case <expressionlist>
<statementblock-2>
Case Else
<statementblock-n>
End Select


Regards,
Torgeir

0 new messages