Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

params for class_Initialize

Status
Not open for further replies.

Targol

Technical User
Sep 13, 2002
908
FR
Vbs allow you to create classes. In each of them, you can code a constructor (
Code:
public sub Class_Initialize
) and a destructor (
Code:
public sub Class_Terminate
). My question is : Can I, as it can be done in java for example, define parameters for the constructor that should work this way :
Code:
class myClass
  public sub Class_Initialize(param1)
    'init class here using param1 value
  end sub
end class

dim o_Class
Set o_Class = new myClass("This is the parameter I provide")

Thanx for any help or clue to overlap this if not possible. Water is not bad as long as it stays out human body ;-)
 
As nobody want to help me (nobody loves me ouinnnnnnn [cry] [cry] [cry]), I did some test by myself.
It isn't possible to add parameters to
Code:
class_initialise
sub. And MS call that OOP !!! Water is not bad as long as it stays out human body ;-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top