Hi.
In an excel 2000 wb I've built a lot of forms with many controls.
Unfortunately, I realized that I've forgotten some code in keydown event for all textboxes & commandbuttons in all my forms.
In order to avoid writing the same code for all the controls in all forms (about 30 userforms with about 5 controls in each form), how can I write code in each userform valid for any control of its.
I figured something like
For each ctrl in userform1.controls
................
but it didn't work.
Besides, once I've found the code, it should be referred only to controls which accept keydown event (not labels etc..).
Anybody can help me?
Thank you.
Nick
In an excel 2000 wb I've built a lot of forms with many controls.
Unfortunately, I realized that I've forgotten some code in keydown event for all textboxes & commandbuttons in all my forms.
In order to avoid writing the same code for all the controls in all forms (about 30 userforms with about 5 controls in each form), how can I write code in each userform valid for any control of its.
I figured something like
For each ctrl in userform1.controls
................
but it didn't work.
Besides, once I've found the code, it should be referred only to controls which accept keydown event (not labels etc..).
Anybody can help me?
Thank you.
Nick