Key Differences Between VB and VB Script
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:
- Debugging VBScript doesn't have a debugger like Visual Basic. You'll
resort to using lots of message boxes, instead.
- Event-handlers You don't have an editor in which you select an object
and event to edit an event-procedure. You have to name event-procedures in your scripts
so that the scripting engine can find the appropriate handler when an object fires
an event.
- Forms VBScript doesn't have a forms editor. It doesn't need one, because you can't display forms anyway. You put forms and controls on the Web page, instead. You can use the ActiveX Control pad to insert all those nasty <OBJECT> tags in your Web page, however.
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.
- Key Differences Between VB and VBScript
- Visual Basic Keywords Included in VBScript
- Visual Basic Keywords Omitted from VBScript
from Special Edition Using HTML 4:
VB Script Keyword Reference
by Rick Darnell
© Copyright Macmillan Computer Publishing. All
rights reserved.






Loading Comments...