I am writing a DLL in VB6, and I need to create a collection but dont know how.
In my DLL class I need to have a list of items which can be called by my VB program in a way "similar" to this:
Set objMyDLL = createobject("MyDLL.MyClass")
Set x = objMyDLL.GetList()
Set y = x.MyItems
For Each z in y
Could someone provide a example of the class code to make tis work?
I am playing with the following code but cant get it to work...
Public Property Get GetList() As Collection
MyItems(0) = "one"
MyItems(1) = "two"
MyItems(2) = "three"
MyItems(3) = "four"
MyItems(4) = "five"
GetList = MyItems