Hi there...
I am at the point where my application is working how I would like it... I now am looking for ways to improve it piece by piece (It works good the way it is but I know it could be more efficient and coded better).
One thing that keeps coming up is when I needed a little nudge from the experts is using class modules.
What I am thinking and having trouble wrapping my head around is using class modules to run when certain controls are accessed.
I have many different groups of controls (textboxes, listboxes, commandbuttons, labels) which are all organized by names.
So I might have 100 textboxes named txtSample1 to txtSample100 and another set of textboxes named txtTest1 to txtTest32 and other various groups of controls.
I want to be able to access a specific class module when one of the txtSample? is accessed and a different class module accessed when the txtTest? controls are accessed.
I know how to check the controls to see if if it is a textbox control or commandbutton control by using control "type", I also know how to check the exact name, if it equals or not equal to txtTest3 do something by using the control name (by exact match).
When using any of the txtSample1 - 100 textboxes, I would like to access the txtSample class and run the different events I need and to do things based on the txtSample 1-100 number.
I currently have all my events for each of the txtSample1 -100 events (keydown, change, etc...) all leading to one procedure and works fine. I would like to get rid of all this excess code and have the controls access the correct class module.
Can I do this?
Craig
Bookmarks