Windows IT Pro is the leading independent community for IT professionals deploying Microsoft Windows server and client applications and technologies.
  
  
  Advanced Search 


November 22, 1999

Creating Classes with VBScript 5.0


RSS
View this exclusive article with VIP access -- click here to join |
See More Windows 2000 Articles Here | Reprints | Or sign up for our VIP Monthly Pass!
SideBar    How VBScript Classes and COM Objects Differ

Classes aren't a new concept in scripting. JavaScript, JScript, and other scripting languages have supported classes or similar elements for years. However, VBScript 5.0 is the first version of VBScript to support classes.

To use classes in your VBScript code, you first need to obtain VBScript 5.0 by downloading the appropriate self-executable file from the Microsoft Developer Network (MSDN) Web site (http://msdn.microsoft.com/scripting) or by installing Microsoft Internet Explorer (IE) 5.0. Then you need to understand what a VBScript class is and learn how to declare, define, initialize, and instantiate a class.

Understanding VBScript Classes
VBScript 5.0 supports two types of objects: COM objects and Class objects (typically referred to as simply classes). VBScript COM objects have basic subtypes, such as an Integer or String. VBScript classes have an abstract subtype that encapsulates data and the functions to work with that data. You can think of a VBScript class as having a souped-up subtype that provides you with more computing power and flexibility. (Other differences exist between these two types of objects. For more information, see the Web-exclusive sidebar "How VBScript Classes and COM Objects Differ" on the Win32 Scripting Journal Web site at http://www.winntmag.com/ newsletter/scripting. For more information about COM objects and how to use them in VBScript, see "Understanding VBScript: Object Management," page 6.) . . .


Already a VIP member?
Please log on to view the full article

Why become a VIP member?

VIP-only online access
VIP CD delivered twice a year: offline access to the entire Windows IT Pro article library
Monthly issue of your choice of Windows IT Pro or SQL Server Magazine

Subscribe Now
Reader Comments
<p>Absolutely awful article that only covers the most superficial layer of creating a class and even then does a poor job.</p>

Tom Grey January 30, 2003


<P>An entire article instead of the single paragraph it should have been.</P>

John Knox May 17, 2004


Terrific! Short and simple. Why couldn't Microsoft's documentation explain it this way?

Michael Greiner June 16, 2004


this article sucks... dont go through it ....

Satadru July 06, 2004


I can't understand the hostility to this article, it's meant to be an introduction and explains exactly what you need to start using VBScript classes.

Anonymous User October 13, 2004 (Article Rating: )


Great Article!!! Thank you.

Anonymous User October 13, 2004 (Article Rating: )


Ignore the criticism - I found it a useful explanation, particularly on set and let.

Anonymous User November 25, 2004 (Article Rating: )


It was a usefule article, but I want to know if you can have classes within classes? An example of that would be nice.

Anonymous User January 19, 2005


not bad atall.

Anonymous User March 21, 2005 (Article Rating: )


Completely adequate and clear explanation, very useful.
I'll be generous and assume the haters of this article already know this stuff, but even assuming that I have no idea why any self respecting coder would dump a useless negative comment and not explain why. Thanks for pooping in the punchbowl and leaving the party you geniuses.

Anonymous User May 19, 2005 (Article Rating: )


 See More Comments  1   2 

You must be a registered user or online subscriber to comment on this article. Please log on before posting a comment. Are you a new visitor? Register now




Top Viewed ArticlesView all articles
WinInfo Short Takes: Week of November 23, 2009

An often irreverent look at some of the week's other news, including some post-PDC some soul searching, a Google Chrome OS announcement and a Microsoft response, Windows 7 off to a supposedly strong start, the Jonas Brothers and Xbox 360, and so much more ...

Command Prompt Tricks

One reader shares his tip for setting up the command prompt to reflect a remote path. ...

2009 Windows IT Pro Editors' Best and Community Choice Awards

Picking a favorite product from an impressive crowd of competitive offerings is never an easy task, and such was the case with our Editors' Best and Community Choice awards this year. ...


Scripting Whitepapers From Development to Production: Streamlining SharePoint Deployment with DocAve Deployment Manager

Related Events Windows, Unix, Linux Interoperability

Check out our list of Free Email Newsletters!

Scripting eBooks Keeping Your Business Safe from Attack: Encryption and Certificate Services

Best Practices for Managing Linux and UNIX Servers

Building an Effective Reporting System

Related Scripting Resources Introducing Left-Brain.com, the online IT bookstore
Looking for books, CDs, toolkits, eBooks? Prime your mind at Left-Brain.com

Discover Windows IT Pro eLearning Series!
Clear & detailed technical information and helpful how-to's, all in our trademark no-nonsense format


Windows IT Pro Home Register FAQ for Windows WinInfo News
Europe Edition About Us Contact Us/Customer Service Media Kit Affiliates / Licensing  
SQL Server Magazine Office & SharePoint Pro DevProConnections IT Job Hound
Left-Brain.com Technology Resource Directory asp.netPRO ITTV Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 © 2009 Penton Media, Inc. Terms of Use | Privacy Statement