J
J Streger
I have several Class modules set up, each representing a larger scope than
the next, so they tier into each other. I was trying to get a string and
couldn't get it to work. The Line I tried was:
sElement = WBSStructure.WorkProduct(inx).Element(iny).Name
Below is a simplified version of the element class, and the workproduct is
similar. I noticed in order to get that nice Illisense I needed to have the
function return cElement, but that is causing an error when i try to retunr
anything other than the class object. Any help would be appreciated, as
Chip's taught me enough to get myself in trouble (No offense Chip )
Private pNameWP As String
Private pElementsWP As New Collection
Property Let Name(S As String)
pNameWP = S
End Property
Property Get Name() As String
Name = pNameWP
End Property
Public Function Element(index As Integer) As cElement
If index > pElementsWP.Count Or index < 1 Then
Err.Raise 9
Else
Element = pElementsWP(index)
End If
End Function
the next, so they tier into each other. I was trying to get a string and
couldn't get it to work. The Line I tried was:
sElement = WBSStructure.WorkProduct(inx).Element(iny).Name
Below is a simplified version of the element class, and the workproduct is
similar. I noticed in order to get that nice Illisense I needed to have the
function return cElement, but that is causing an error when i try to retunr
anything other than the class object. Any help would be appreciated, as
Chip's taught me enough to get myself in trouble (No offense Chip )
Private pNameWP As String
Private pElementsWP As New Collection
Property Let Name(S As String)
pNameWP = S
End Property
Property Get Name() As String
Name = pNameWP
End Property
Public Function Element(index As Integer) As cElement
If index > pElementsWP.Count Or index < 1 Then
Err.Raise 9
Else
Element = pElementsWP(index)
End If
End Function