View Single Post
  #4 (permalink)  
Old 08-07-2008, 05:13 PM
kjb_work kjb_work is offline
Junior Member
 
About:
Join Date: Aug 2008
Posts: 1
kjb_work is on a distinguished road

Default


Quote:
Originally Posted by mhookem View Post
Hello, I've got a problem getting some VBScript to work. Can anyone point me in the right direction and tell me what I'm doing wrong?

Here is the code:


<body>
<%
Dim myNum
myNum=5
Select Case Number
Case 2
Response.Write("Two")
Case 3
Response.Write("Three")
Case 5
Response.Write("Five")
Else Case
Response.Write("No Number")
End Select
%>
</body>

I keep getting the error message 'An error occurred on the server when processing the URL. Please contact the system administrator'

Thanks

Martin
well first off I would say Number is not declared. If you wish to case on myNum then you should have


Select Case myNum
Case 2
do stuff
Case 3
do diff stuff
end select


VBscript does not have a break statement.

kjb



Reply With Quote