I wonder if there is a way to add an enumerator to a VB array, for example:
Class1Code:For Each vArrayItem In vArray 'Do something Next
Thanks.Code:Option Explicit Private mItems() As Variant Public Property Get Item(ByVal Index As Long) As Variant Item = mItems(Index) End Property Public Property Let Item(ByVal Index As Long, NewVal As Variant) mItems(Index) = NewVal End Property Public Function NewEnum() As IUnknown Set NewEnum = mItems.[_NewEnum] End Function Private Sub Class_Initialize() mItems = Array(10) End Sub




Reply With Quote