dvplayltd
asked on
How to edit collection variable in VB6 ?
Hi experts!
I’m using collection in VB6.
Set cAppSet = New Collection
cAppSet.Add 1, sAPP_HARMONY
But my question is how can I later correct value of this collection ?
I try with
cAppSet(sAPP_HARMONY) = 0
give error, then I try first to delete it and add again, it work, but when I try to access collection I get error.
cAppSet.Remove sAPP_HARMONY
cAppSet.Add 1, sAPP_HARMONY
and when make
If cAppSet(sAPP_HARMONY) Then
I get error
Object is not longer valid
So – how can I edit collection value ?
I’m using collection in VB6.
Set cAppSet = New Collection
cAppSet.Add 1, sAPP_HARMONY
But my question is how can I later correct value of this collection ?
I try with
cAppSet(sAPP_HARMONY) = 0
give error, then I try first to delete it and add again, it work, but when I try to access collection I get error.
cAppSet.Remove sAPP_HARMONY
cAppSet.Add 1, sAPP_HARMONY
and when make
If cAppSet(sAPP_HARMONY) Then
I get error
Object is not longer valid
So – how can I edit collection value ?
I believe you might also be able to reference it:
cAppSet.Item!sAPP_HARMONY = 0
cAppSet.Item!sAPP_HARMONY = 0
Sorry, this
cAppSet!sAPP_HARMONY = 0
cAppSet!sAPP_HARMONY = 0
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
10x. I know Dictinary object from C# and I'm glad it is present in VB6. Thanks !
cAppSet.Item(sAPP_HARMONY)