|
Microsoft Office Application Development
|
|
Handling Worksheet control events using a class module. Introduction 1 2 3 Conclusion ConclusionAs shown in this article it is possible to replace a multitude of event subroutines by a single class module in combination with an initialisation routine. This is particularly useful when one has a multitude of controls on a single form or worksheet and wants to perform similar actions on a specific event of each control. Unfortunately, not all events we are used to get are available when we use this method. Some missing events are quite crucial, such as the AfterUpdate event for a textbox. A sample file can be downloaded here. FeedbackSince you have managed to reach the end of this article, maybe you would care to write me a small message, expressing your opinion on this article? Click here to write an email message to me. You can also rate this article: (Rated: 271 times, average rating: 6.2)![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
CommentsAll comments about this page: Comment by: Rogerio Takejame (3/27/2006 6:58:25 AM)I've tried to use this method but, instead of using option buttons, I used OLEObjects.Image. I noticed that it hooks every image to the class module and adds to the collection without any problem, but after the last End Sub, the collection looses all its values. In a comment inside the code you said that the collection should keep its value for the entire workbook life. What am I doing wrong? Thanks for your help Rogerio Takejame Americana - Sao Paulo - Brazil Comment by: Jan Karel Pieterse (3/27/2006 9:47:42 AM)Hi Rogerio, Did you declare the Collection variable at the top of the module? Comment by: JK (8/16/2007 11:35:02 AM)Thanks for the easy to follow example. It helped a lot. Comment by: Harry (4/9/2008 10:12:04 PM)I have been looking for this to coordinate 12 comboboxes that drive a selective graphing routine for large data such as weather . If I can adapt it I will semd you a copy. Thanks Harry S. Add a comment too!!!<<Previous | ||||||||||||||
|
Use the contact page to issue
questions or comments about this website. |