I have been making use of custom collection classes based on this article:
Using Custom Collections in Microsoft Access
http://www.databaseadvisors.com/new...ng custom collections in microsoft access.asp
I need to add enumeration through the custom collection. Since this custom class is implementing the code VBA Collection, I suppose I need to only wrap methods of the VBA Collection and expose them in my custom class interface. Am I suspecting correctly? Does anyone happen to have sample code? I am unsure of what sort of return codes VBA expects in order to comply with supporting proper individual object enumeration within a For Each...Next Statement.
Solution:
In post #49 the light bulb came on that a VBA.Collection supports retrieval of Objects stored in the VBA.Collection via two ways:
1) String key name assigned when the Object was Added to the VBA.Collection
2) A Long Integer number which VBA assigns when the Object is Added to the VBA.Collection
Therefore I suggest using the Variant variable type to support both the String / Long data types possible to use to retrieve a particular Object out of the VBA.Collection.
Using Custom Collections in Microsoft Access
http://www.databaseadvisors.com/new...ng custom collections in microsoft access.asp
I need to add enumeration through the custom collection. Since this custom class is implementing the code VBA Collection, I suppose I need to only wrap methods of the VBA Collection and expose them in my custom class interface. Am I suspecting correctly? Does anyone happen to have sample code? I am unsure of what sort of return codes VBA expects in order to comply with supporting proper individual object enumeration within a For Each...Next Statement.
Solution:
In post #49 the light bulb came on that a VBA.Collection supports retrieval of Objects stored in the VBA.Collection via two ways:
1) String key name assigned when the Object was Added to the VBA.Collection
2) A Long Integer number which VBA assigns when the Object is Added to the VBA.Collection
Therefore I suggest using the Variant variable type to support both the String / Long data types possible to use to retrieve a particular Object out of the VBA.Collection.
Last edited: