1)使用Event在类中声明事件;
Public Event Change(Cancle As Boolean)
2)使用WithEvents创建带Event的对象;
Private WithEvents mc As MyClass
3)在所有与事件发生关联的地方,使用RaiseEvent引发事件;
RaiseEvent Change(yn)
4)为对象的事件编写代码。
Private Sub mc_Change(ByRef Cancel As Boolean)
本文示例下载:http://download.csdn.net/source/2467853
FROM:http://club.excelhome.net/thread-198049-1-4.html