Hi
I'm having a few problems with this and would be grateful for any help.
I have declared a public collection in a module. I can add and retrieve items to the collection no problem - but I dont seem to be able to change an item in the collection. I am using the collection to store some strings - however once stored the strings appear to be read only.
e.g. the value of cCollection.Item(1) is "Yes" and I want to change it to "No" - I would have thought the following would do it:
cCollection.Item(1) = "No"
however I get a blue line when I type this which says "Property 'item' is 'read only'"
Is it possible to change items in a collection? I would use an array - but I want the ability to use the collection's key property so that I can remove items easily.
I'm having a few problems with this and would be grateful for any help.
I have declared a public collection in a module. I can add and retrieve items to the collection no problem - but I dont seem to be able to change an item in the collection. I am using the collection to store some strings - however once stored the strings appear to be read only.
e.g. the value of cCollection.Item(1) is "Yes" and I want to change it to "No" - I would have thought the following would do it:
cCollection.Item(1) = "No"
however I get a blue line when I type this which says "Property 'item' is 'read only'"
Is it possible to change items in a collection? I would use an array - but I want the ability to use the collection's key property so that I can remove items easily.
Last edited: