View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
RB Smissaert RB Smissaert is offline
external usenet poster
 
Posts: 2,452
Default update collection of arrays

Norman,

Yes, you are right, the arrays just confused the fundamental issue here.

RBS


"Norman Jones" wrote in message
...
Hi Bart,

A collection only has three methods: Add, Remove and Item, so I do not
think that a that a collection element can be changed, irrespective of
whether an array is involved or not.

---
Regards,
Norman



"RB Smissaert" wrote in message
...
Is it possible to update the value of an array element if that array is
held by a collection?
It seems not:


Sub test2()

Dim oColl As Collection
Dim arr(1 To 10)

Set oColl = New Collection

arr(1) = 5

oColl.Add arr, "a"

MsgBox oColl(1)(1)

oColl(1)(1) = 6

MsgBox oColl(1)(1)

End Sub


Is there any solution for this?
The whole purpose is to store data with nodes of a treeview control and
to have a robust
linkage between the nodes and the stored data.


RBS