I try to write an array property and running my code I always get the error that I cannot assign to a write-protected Property.
My code:
Private pQ(9) As String
Public Property Get Q() As String()
Q() = pQ()
End Property
Public Property Let Q(value() As String())
pQ() = value()
End Property
I thought it is because of the parentheses so I tried all combinations but it didnt worked. Anyone who can help me with this, please?
This is where I get the error:
For j = 0 To 9
.Q(j) = ThisWorkbook.Worksheets("xx").Cells(3, j + 1)
Next j
Property Let Q(value() As String())doesn't seem to be correct syntactically. Second odd thing is you try to assign the reference of a dynamic array to a statically allocated array.