Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Select Case statement syntax

Status
Not open for further replies.

scroce

MIS
Nov 30, 2000
780
US
I'm having trouble with the syntax when trying:

Code:
Select Case str

Case "All" OR ""
  do stuff
Case "choice1"
  do other stuff
Case Else
  do stuff
End Select

It seems to gag on the OR statment. It seems I remember being able to do that in VB or VBA - does ASP script not support this, or am I just messing up the syntax?

I am a nobody, and nobody is perfect; therefore, I am perfect.
 
just use a comma

Case "All" , ""

Programming today is a race between software engineers striving to build better and bigger idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. - Rick Cook (No, I'm not Rick)

zen.gif
 
There is no OR. OR at least I don't use an OR

Try this -

Select Case str

Case "All",""
do stuff
Case "choice1"
do other stuff
Case Else
do stuff
End Select
 
thanks. that's it

I am a nobody, and nobody is perfect; therefore, I am perfect.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top