There is a userform that has many textboxes and I need to detect changes in each. So I have write a subroutine for every textbox in the form and it turns out a large piece of code. As the code for every textbox is the same I want to optimize it. So is it possible to write just one subroutine that detect changes in any textbox of the form?
相关问题
- Stop child process when parent process stops
- Fire resize event once not based on timing
- Error handling only works once
- Excel formula in VBA code
- Excel VBA run time error 450 from referencing a ra
相关文章
- What does it means in C# : using -= operator by ev
- How are custom broadcast events implemented in Jav
- Unregister a XLL in Excel (VBA)
- Programming a touch screen application with SWING
- How many pixels are scrolled on a website with a m
- Difference Between RoutedEventHandler and EventHan
- numeric up down control in vba
- Declare a Range relative to the Active Cell with V
The only way do achieve that is to use a class along with
WithEvents
Here's a minimal example:
Code for the class module named
mytextbox
:And the code inside the Userform, assuming you want to handle the events of every Textbox