Excel VBA Userform - Execute Sub when something changes

前端 未结 7 498
攒了一身酷
攒了一身酷 2020-12-01 15:09

I have a userform containing lots of text boxes. When ever the values of these text boxes changes, I need to recalculate my end result values based on the textbox values by

7条回答
  •  悲&欢浪女
    2020-12-01 15:47

    Take a look at this for how to create a class that responds to a change in any textbox. The example is for buttons, but can be modified. However, be aware that Textbox controls don't have an Exit event (that event is actually part of the userform) so you really will have to use the Change event.

提交回复
热议问题