Class, Properties, and Methods

You could create a class called "Dog". This Dog class could have properties called "Color", "Breed", and "Name", and it could have methods called "Bark" and "Sit". The class defination would have code to implement these properties and methods. Objects created at runtime from the Dog class would be able to set and read the properties and call the methods. A class typically exists as part of a component. For example, you might have a component called "Animals" that contains a bunch of different classes like "Dog", "Elephant", and "Rhino". The code to create and use a Dog object would look something like this:

Dim objMyDog
Set objMyDog = WScript.CreateObject("Animals.Dogs")
objDog.Name = "Buddy"
objDog.Breed = "Poodle"
objDog.Color = "Brown"
objDog.Bark
objDog.Sit

First
Next