Click to See Complete Forum and Search --> : Array of Objects


udipr
April 23rd, 2001, 04:10 AM
Hello

I have ActiveX EXE With Events.

I want to define dynamic array of that object. But I get error on the define line, I wrote that code:


private withevents ObjTest() as CTests




Is there any way to define array of object with events???

Thanks for any help.

Cakkie
April 23rd, 2001, 05:02 AM
I think this will answer the question (from MSDN):

WithEvents: Keyword that specifies that varname is an object variable used to respond to events triggered by an ActiveX object. WithEvents is valid only in class modules. You can declare as many individual variables as you like using WithEvents, but you can't create arrays with WithEvents. You can't use New with WithEvents.

Tom Cannaerts
slisse@planetinternet.be

Programming today is a race between software engineers striving to build bigger and better idot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning -- Rich Cook