So I have two different classes, the main and the object class. The thing is that I want to send two arrays to setArray
but Property Let
doesn't allow me too. How can I do this, I know that dData.setArray = xData(0), xData(1)
is wrong but that's how I would do it if I have one argument.
Main:
dData.setArray = xData(0), xData(1)
Object Class:
Property Let setArray(name As Variant, value As Variant)
Dim i As Long
For i = 0 To UBound(name)
data.Add CStr(name(i)), CInt(value(i))
Next i
End Property
You can have property lets with multiple arguments, but obviously with only one 'right hand side', which is the last argument in the property signature (value As Variant
in your case). The assignment syntax for your signature will be this:
dData.setArray(xData(0)) = xData(1)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With