
Raising events from objects in a collection???
sure you need to send back the object
RaiseEvent MyEvents(MyObject)
Sub objDoor_Opened(Myobj as objDoor)
if objDoor.id=10 then
'some code
else
'more code
end if
'code when door has opened
'yadda yadda yadda
End Sub
Quote:
> Does anyone know of some type of routine to respond to events of objects
in
> a collection.
> For example:
> -objDoor is an object which has an "Opened" event
> -colDoors is a collection of objDoor objects
> To repond to the event with just an object, you would code:
> Sub objDoor_Opened()
> 'code when door has opened
> 'yadda yadda yadda
> End Sub
> But what if there were several - or several hundred - objDoor "items"
> (objects) in an objDoors collection, and one of them doors opened. How
would
> you respond to that?