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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Select Case Syntax error?? 1

Status
Not open for further replies.

snowboardr

Programmer
Joined
Feb 22, 2002
Messages
1,401
Location
PH
Im getting an error on End Select
any ideas??

Microsoft VBScript compilation error '800a03ea'

Syntax error

/vzio/Default.asp, line 108

End Select
^


Code:
Function WriteLink(Plan, optionORdetails)

Select Case Plan

Plan 0
If optionORdetails = 0 then
Plan = "?view=Hosting+Packages&option=w.basic" 			
Else
Plan = "?view=Hosting+Packages&order=w.basic"
End If
Plan 1
If optionORdetails = 0 then
Plan = "?view=Hosting+Packages&option=w.advanced"
Else
Plan = "?view=Hosting+Packages&order=w.advanced"
End If
Plan 2
If optionORdetails = 0 then
Plan = "?view=Hosting+Packages&option=w.enterprise"
Else
Plan = "?view=Hosting+Packages&order=w.enterprise"
End If
Plan 3
If optionORdetails = 0 then
Plan = "?view=Hosting+Packages&option=l.basic"
Else
Plan = "?view=Hosting+Packages&order=l.basic"
End If
Plan 4
If optionORdetails = 0 then
Plan = "?view=Hosting+Packages&option=l.advanced"
Else
Plan = "?view=Hosting+Packages&order=l.advanced"
End If
Plan 5
If optionORdetails = 0 then
Plan = "?view=Hosting+Packages&option=l.enterprise"
Else
Plan= "?view=Hosting+Packages&order=l.enterprise"
End If

End Select

End Function
 
The syntax for the case statement is:

Select Case plan
Case 0
...
Case 1
....
Case Else
...
End Select

 
Ah shoot! I have used it a dozen times before...i cant believe i did this. haha thanks alot!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top