Hi,
I got a problem with the events... i'm probably doing wrong but... i can't find what is wrong!!
Here's an example file, if someone can help me EVENEMENTS.xlsm
Hi,
I got a problem with the events... i'm probably doing wrong but... i can't find what is wrong!!
Here's an example file, if someone can help me EVENEMENTS.xlsm
That looks fine to me, what are you expecting to happen?
Actually, scrap that, you haven't declared your classes properly.
Classe2:
you should really be using option explicitPlease Login or Register to view this content.
Last edited by Kyle123; 08-28-2012 at 12:26 PM.
well i'm not using option explicit because it's an example file and i did it quickly so... my code is a bit dirty lol
Basically, why when my procedure in classe1 raise the event, why my procedure associated to the event in my class 2 does not start :/ it should display a msgbox...
ok, i've understand where i missed. my object must have the same name as in the declaration... logical... but I have another problem in my real code. my object are stocked in a collection... So how can I declare them??? :o
It might be better to describe what you're actually trying to do.
You'd need somewhere to actually put the sub that's run when the event is raised
well it's exactly the same construction as the following example :
Company -> staff crew -> collection of employeesPlease Login or Register to view this content.
and i'll have an event raised by an employee, and i want it to be recieved by the staff crew. How can I do it??
thank's
A bit more background would be useful. For example, if you could do what you are proposing - which I don't think you can. How would you know which Employee raised the event?
the event will return the id of the employee
Ok, fair enough, have a look here
http://www.mvps.org/vbvision/collection_events.htm
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks