Special Edition Using HTML 4: -- VB Script Keyword Reference

By Joe Burns

http://www.htmlgoodies.com/beyond/asp/article.php/3470091/Special-Edition-Using-HTML-4----VB-Script-Keyword-Reference.htm (Back to article)

Key Differences Between VB and VBScript

You didn't run out to the computer store and buy a copy of VBScript. You didn't install a VBScript disk on your computer, either. All you did was install the Internet Explorer browser, which supports VBScript, on your computer--just like millions of other folks. Everyone of them has the VBScript engine on their computer, and everyone of them has the ability to create Web pages with VBScript.

So where's the integrated development environment that you're used to using in Visual Basic? Keep looking, because there isn't one. All you have is your favorite text editor, the ActiveX Control Pad, and a Web browser. That in itself is the single largest difference between Visual Basic and VBScript. It leads to some specific differences, too. Here's what they are:

You don't compile a VBScript program into an EXE file like you do with a Visual Basic program. You distribute your scripts as plain, old text embedded in HTML files. Everyone and his uncle can read your scripts. The script engine interprets this text into intermediate code when it loads the Web page. It also creates a symbol table so that it can quickly look up things such as event-procedures and variable names. The scripting engine uses the ActiveX Scripting technology to interact with the browser.


[BEG]NOTE:[END] You'll find a plethora of nit-picky differences between Visual Basic and VBScript, too. You have to use the value property to query an objects value, for example. Thus, instead of reading a text box's value using form.text, you have to read it using form.text.value. These subtle differences are too numerous to document in this appendix. Go to Microsoft's Web site (www.microsoft.com) and their knowledge base for further explanation of these differences.

Another significant difference between Visual Basic and VBScript is the keywords that Microsoft omitted from VBScript. You'll learn more about the keywords included in VBScript in the next section. You'll learn about the keywords that Microsoft omitted from VBScript in "Visual Basic Keywords Omitted from VBScript," later in this appendix.

© Copyright Macmillan Computer Publishing. All rights reserved.