I'm using Excel 2013.
I have a class called clsFund. It has one property of type string() called CompanyNames.
private pCoName() as string Public Property Get CompanyNames() As String() CompanyNames = pCoName End Property
In a standard module I try to retrieve this string array but without any luck. I have the code below. The funny thing is the ubound tells me the correct answer of 10 but it doesn't like the line below clsData.PnL, the method is just expecting a string argument which I belive I have supplied however I get a compile error: wrong number of arguments or invalid property assignment - I do not understand?
Private Sub PrintCompanyNameAndPnL() Dim i As Integer For i = 1 To UBound(Fund.BloombergIndices) Range("A" & i) = clsData.PnL(Fund.CompanyNames(i)) Next i