i trying retrieve data have stored in collection in vba. not sure how retrieve data. gives me type mismatch error.
my code looks this:
set col = new collection col.add bgn_arr, "bgn" col.add cbbt_arr, "cbbt" dim curr_arr() variant set curr_arr = col("bgn") tried well:
set curr_arr = col.item ("bgn") need guidance on this.
you have 2 issues see:
- you have set
curr_arr() variant- should not array. - you using
setmethod cause issue.
this code should work:
set col = new collection col.add bgn_arr, "bgn" col.add cbbt_arr, "cbbt" dim curr_arr variant curr_arr = col.item ("bgn")
Comments
Post a Comment