Note to self... VBScript / ASP doesn't call a switch statement a switch statement
I just spent like twenty minutes searching Google for the syntax for a VBScript switch statement only to find out that VBScript calls it a select statement.
Why on earth does VBScript call it a select statement when every other language calls it a switch statement? I guess that's Microsoft for you! :)
Related tags: Select, Switch, VBScript
- Save this article for later, bookmark it!
- del.icio.us digg newsvine blinklist magnolia
Post Your Comment
Post Guidelines
Please be considerate of others. Keep comments relevant. Content deemed inappropriate or offensive may be edited and/or deleted. Email addresses are never displayed.
Line breaks and paragraphs are automatically converted — no need to use p or br/. Quotes, apostrophes, and double-dashes are automatically converted to smart punctuation. Be careful when copying and pasting portions of entries or other comments.
Links can be created using the standard <a href="http://url">urlName</a>. The following inline HTML elements may also be used: strong, em, cite, & code. The title attribute is allowed within any element. All other code will get removed before posting.
Latest Photos
Good Reading
- The easiest way to write your life story | OhLife
- Python Package Index : pyflakes 0.4.0
- bkroeze / django-bursar / overview — bitbucket.org
- Using virtualenv, pip and django-site-gen to quickly start new Django projects
- Video on the Web - Dive Into HTML5
- IBM Express Advantage icons by Philippe Intraligi
- A nice looking set of icons.

Comments
Thanks for the note! I was doing the same google hunt when I found your post. Guess I saved myself about 10 minutes. ;)
I just found your post via google when I was looking for information on switch statements in VBScript.
Cheers!
Same. Thanks!
I think the actual nomenclature is "case" statement
But I'm stupid as you lot and got to this page googling for "vbscript switch" too ;)
Switching (pun intended) my brain between javascript and vbscript isn't easy
Thanks for the info
same here ... i googled "asp vbscript switch" lol :) VBscript is a *$ù$°+# a language ...
Same here
I did the same, you saved my 15 minutes
Give you an example:
select case n case 0 : statement1 case 1 : statement2 End Select
I am in the same boat too :) MS tries to waste other people time. Thanks
I can never remember the syntax for the VB 'switch' statement, and have to google it everytime. Here's a post for me for future references:
dim n as String
select case n case "hello","hi": gohere() case "Somethingelse": return case default: gosomewhere_else() End Select
also, so anyone else in the future has some more example to go after
Sorry bout the report ... i should google before i open my mouth :)
1) you dont use colons ( : ) 2) the 'default' should be 'Else' : Case Else DoOther() End Select
Glad to see i'm not the only one... sheesh
LOL, googled "vbscript switch case"
Thank you so much for posting this.
This page came up #4 in altavista (my search engine of choice) and it saved me tons of effort.
I knew it wasn't called switch, but I couldn't remember what it was. Thanks for posting this!
Heh, posted more than 5 years ago and still helping out people. I also got here trough google. 3rd hit. Problably saved me 20 minutes!
I fricking hate .VBS but it's either that or .Batch when you want to customize windows through some scripts.
Thanks :)