SHARE
Facebook X Pinterest WhatsApp

Key Differences Between VB and VB Script

Written By
thumbnail
Rick Darnell
Rick Darnell
Jan 13, 2005

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:

  • 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.

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.


from Special Edition Using HTML 4:


VB Script Keyword Reference



by Rick Darnell


© Copyright Macmillan Computer Publishing. All
rights reserved.

Recommended for you...

Guide to International SEO
How to Use the HTML a Tag
Project Management Tools for Web Developers
Enrique Corrales
Jun 20, 2022
Five Essential HTML5 Editors
HTML Goodies Logo

The original home of HTML tutorials. HTMLGoodies is a website dedicated to publishing tutorials that cover every aspect of being a web developer. We cover programming and web development tutorials on languages and technologies such as HTML, JavaScript, and CSS. In addition, our articles cover web frameworks like Angular and React.JS, as well as popular Content Management Systems (CMS) that include WordPress, Drupal, and Joomla. Website development platforms like Shopify, Squarespace, and Wix are also featured. Topics related to solid web design and Internet Marketing also find a home on HTMLGoodies, as we discuss UX/UI Design, Search Engine Optimization (SEO), and web dev best practices.

Property of TechnologyAdvice. © 2025 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.