Array Property in VBA Class -
Array Property in VBA Class -
i seek write array property , running code error cannot assign write-protected property.
my code:
private pq(9) string public property q() string() q() = pq() end property public property allow q(value() string()) pq() = value() end property
i thought because of parentheses tried combinations didnt worked. can help me this, please?
this error:
for j = 0 9 .q(j) = thisworkbook.worksheets("xx").cells(3, j + 1) next j
you cannot utilize arrays in property pairs.
if could, illustration pass around new copies of backing array not efficient.
you need pass around index , value utilize these read , write internal array:
public property q(index integer) string q = pq(index) end property public property allow q(index integer, value string) pq(index) = value end property
vba
Comments
Post a Comment