Try this...
Add a new userform and 2 textboxes. Paste the following in the userform code module:
Add a new CLASS module. Paste the following to the class:
Leave all names as the default, the Class should be named Class1. Hopefully you do not have any other classes (Doubtful
) but it's easy enough to change.
Try running that (the userform, not your complete project) and see if you can understand what's going on... The key to this is the declaration using WITHEVENTS in the Class and the array of classes in the userform.
After running once, add another textbox or 2. No coding changes will be needed for the new textboxes to respond to changes. (Hopefully!)
Bookmarks