Using Class Events

Unlike standard modules, class modules can raise their own events. This is a very powerful feature of VBA, because it not only gives your code the ability to know what's going on inside the class instance, but also provides the opportunity to take whatever actions you deem necessary based on those events.

Another very important benefit of using class events is that you can keep User Interface (UI) functionality separate from the class implementation, making the class truly independent and reusable. You can then use your class in many places without worrying about specific UI implementation. This section focuses on getting your class to talk to the rest of your application, through events.

0 0

Post a comment