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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to overload Class_initialize() in VB

Status
Not open for further replies.

vilrbn

Programmer
Oct 29, 2002
105
0
0
FR
Hi,
I need to overload the function class_initialize() that means that I need to have a parameter DatabaseName in class_initialize():
class_initialize(DatabaseName as String)
so be able to call the instanciation of my object as:

set Object = New MyObject(DatabaseName)

But I don't succeed to find a syntax that works.

Is it possible in Visual Basic 6.0?

Thanks for your help.
Rachel.

 
I second John's comment. That is not possible in VB6.

You would have to create a property and set it after construction.

Chip H.


____________________________________________________________________
If you want to get the best response to a question, please read FAQ222-2244 first
 
TAs John and Chip have said, constructors are not supported in VB6. You can work around this by creating and using a factory object
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top