Implemented in version 5.0
Class ... End Class
statement block is used to create a
object. You can only create (name) one
object with each
statement. This ability to create your own
is a significant expansion of the usefulness of the VBScript language.
Within the block of the
statement you can declare the members of the class, which are variables, methods, and properties. Methods of the class are implemented by defining a
procedure, while properties are defined through the use of
statements. Any member of a class may be declared as either
, with a
declaration being the default state.
members of a class are only accessible by other members of the same class, while
members are accessible by anything, inside or outside of the scope of the class.
statement must always end with an
' Creating a private property using Get, Let, Set
Public Property Get CustomerName()
CustomerName = mstrName
Public Property Let CustomerName(strName)
mstrName = strName
Public Property Set Guru(objGuru)
Set mobjGuru = objGuru
' Creating a private method using a function
Private Function DevGuruProductName(intProduct)
Select Case intProduct
DevGuruProductName = "dgCharge"
DevGuruProductName = "dgList"
DevGuruProductName = "dgReport"
Copyright 1999-2004 by Infinite Software Solutions, Inc. All rights reserved.