-
I want to create a simple collection such as:
Code:
Dim colNew as New Collection
colNew.Add "Text", "Key"
I want to change the key value in the collection like
you can for the ListView control.
Code:
ListView.ListItems(1).Key = "Key"
ListView.ListItems("Key") = "Text"
It seems that once you put the key into the collection,
there is no way to modify it. Does anyone know of a way?
-
One way you *might* be able to do this is to add the text to the collection a second time with the new key then delete the old key, which would in effect give you the same text with a changed key.
Paul
-
Yup! I agree. I thought of that also and it looks
like that is the way to go...
Code:
Dim objItem as clsItems
Set objItem = New clsItems
Set objItem = colItems("OrigionalKey")
colItems.Add objItem, "NewKey"
colItems.Remove "OrigionalKey"
Or something along that line. Thanks!