jeroenh
Dec 14th, 2000, 03:22 AM
I am currently at a loss. A little while ago I asked how to create a Collection Class. I've got the code and it works.
Only one small problem. My program start an ActiveX EXE witch searches a database and give data by raising an event. This is the problem. When the Collection Class is passed back, I can't use indexes anymore.
An example
Private WithEvents MyData As CollClass
________________________________________________________
Public Sub MyData(Data As UserType)
msgbox Data(i).Name
End Sub
This is where the event is triggerd. The problem is that this code doesn't work. I get the message that the object variable is not set and so on. You all had it once or twice.
Why is this and how can I overcome this problem. The strange thing is that by using the For Each ... Next structure I can access the data in the Class. What's going on???
Only one small problem. My program start an ActiveX EXE witch searches a database and give data by raising an event. This is the problem. When the Collection Class is passed back, I can't use indexes anymore.
An example
Private WithEvents MyData As CollClass
________________________________________________________
Public Sub MyData(Data As UserType)
msgbox Data(i).Name
End Sub
This is where the event is triggerd. The problem is that this code doesn't work. I get the message that the object variable is not set and so on. You all had it once or twice.
Why is this and how can I overcome this problem. The strange thing is that by using the For Each ... Next structure I can access the data in the Class. What's going on???