While searching for a way to simulate a fillable grid on a userform, I came across
CodePudding user response:
Actually, the form has a property called "controls" which is a collection (not an array). When you add a control dynamically through code, it automatically goes into the "controls" collection. You certainly can make an array of controls (as you show in the question), but when you create a control dynamically with code, there is no array involved. Here's a post that shows adding a label programmatically:
Here's a page that talks about adding combo-boxes:
If you need to add event handlers to the dynamically added controls, there are limitations and it's a bit convoluted. Here's a link that talks about it
adding event handlers to dynamically generated controls
Good luck with this project.