The Item method of a Decision Support Objects (DSO) collection returns an instance of an item in the collection. This method does not apply to CustomProperties collections.
Set vnt = colCollection.Item(vntIndexKey)
Note All collections in the DSO object model are one-based. That is, the first item in the collection has an index of 1 and the last item has an index of Count.
Use the following code to return the partition named “EastCoast” from the MDStores collection of partitions for a cube:
' Assume the existence of an object cubCube
' of ClassType clsCube
Dim Temp_Partition As MDStore
' Retrieve using the key
Set Temp_Partition = cubCube.MDStores.Item("EastCoast")
' OR Retrieve using the Index
Set Temp_Partition = cubCube.MDStores.Item(2)