J-P-W wrote:
"Stock Value" Could be anything from 0 to a million or so, and might
include a decimal (12345.67)
I can't find how to do this:
Select Case StockValue
Case 0 To 30000
response.Write("Less than 30000")
Atually, the To comparison would include 30000, so a value of 30000 would
make this true.
Case 30000 To 80000
response.Write("30000 to 80000")
Case 80000 To 180000
response.Write("80000 to 180000")
Case Else ' > 180000
response.Write("Greater than 180000")
End Select
I also tried Case > 0 And <30000 .... and so on
Can anyone advise how to write this select script please?
Thank you
Jon
In VB, what you've done would work. Unfortunately, this is not one of the
pieces of "syntactic sugar" that survived during the creation of vbscript.
However, there is a workaround:
Select Case True
Case (StockValue<30000)
Case (StockValue>=30000 and StockValue<80000)
etc.
End Select
You can also use
If ... then
ElseIf ... then
Else
End If
Bob Barrows
PS. you can download the vbscript documentation from here:
http://tinyurl.com/7rk6
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"