
How to create UserForm: in Excel, VBA
Create a UserForm containing a dynamic number of controls and make sure they are being triggered by certain events. To achieve this result, we will use a UserForm and a class module, and assign any control dynamically created in the userform to the class module. Finally the aim of this tutorial is also to obtain a single module and make the calling function as simple as possible (limited to 2-3 lines of code). Read on for the code.