View Single Post
  #1   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

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