design one event handler for multiple textboxes
You cannot have one event handler for multiple controls.. at least not in
Excel 2003, not sure about 2007. The most you can do is put all the logic in
one subroutine and call that in the individual event handlers. However, for
the example that you gave, you can just set the MaxLength property of the
textboxes to 30.
--
Hope that helps.
Vergel Adriano
"clara" wrote:
Hi all,
In a form, there are 30 textboxes who all need the limitation of 30 chars in
length. I know code can be put in the change event, but if I do it in that
way, I will use 30 event handlers even I can abstract the core logic into a
sub.Is there a way to use one handler for all text box controls
Clara
--
thank you so much for your help
|