"Publishing" object?greenspun.com : LUSENET : MW Software's Visual BASIC Descusion System : One Thread |
Hi, I am trying to access a property that belongs to a class two hierarchies below the form I try to use it in.Suppositions: 1. form: frmMain 2. class: clsObj1 3. class: clsObj2 4. clsObject2 posesses varName and mArray
I generate clsObj1 in frmMain and than again clsObj2 in clsObj1. clsObj2 "gets/lets" the two properties.
frmMain:
Dim Object1 As clsObj1 Set Object1 = New clsObj1Dim Object2 As clsObj2 Set Object2 = New clsObj2
clsObj1:
Public Property Get varName As String varName = lkl_varName End Property Public Property Let varName(ByRef par_Name As String) lkl_varName = par_Name End PropertyPublic Property Get Object2() As clsObj2 Object2 = lkl_clsObj2 End Property
clsObj2:
Public Property Get varName() As String varName= lkl_Name End Property Public Property Let varName(ByRef par_Name As String) lkl_Name = par_Name End PropertyPublic Property Get mArray() As Variant mArray = lkl_Array() End Property Public Property Let mArray(ByRef par_Array As Variant) lkl_Array = par_Array End Property
But somehow I can access neither varName nor mArray via:
frmMain.Object1.Object2.varNameHow do I have to declare Obj2 to make it work? Is it any different, if I want to use an array? Like:
frmMain.Object1(1).Object2(1).mArrayThanks a lot.
-- Zwen (lan_genua@gmx.de), October 16, 2002