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

Parent Object??

Status
Not open for further replies.

caseye

IS-IT--Management
Feb 7, 2002
52
US
Is there a parent Object Reference in Visuab Basic 6
 
If you mean an implicit reference to the object that created the current one, then no. You'll have to set the necessary reference explicitly, something like:

Public Property Let Parent(parentObj As YourClass)
Set mParent = parentObj
End Property

...but you'll need to make sure the parent object reference is cleared (Set mParent = Nothing) before the child object is destroyed or you'll have a memory leak...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top