I've been getting a
wrong number of argument or invalid property assignment collection
error for a long time now, but can't figure out what's wrong. I have a class and a Collection inside that class and a Sub to add values to that collection.
Private sumLosses As Collection
Private Sub Class_Initialize()
Set sumLosses = New Collection
End Sub
Public Property Get getSumLosses()
getSumLosses = sumLosses
End Property
Inside main module:
For Each clientCopy In clientsColl
clientCopy.getSumLosses.Add 200 'error
clientCopy.getSumLosses.Add (200) 'error
Next
Why does this fail and how do I add the items to a class' collection?