Add controls to UserForm

  • Thread starter Thread starter Vyyk Drago
  • Start date Start date
V

Vyyk Drago

Hi,

I'm trying to write a procedure where Excel will
automatically add a certain number of TextBoxes to a
UserForm based on the number of rows in a table. Can
this be done? Also, can a form be created on the fly
using code and how are commands assigned programmatically
to the controls on such a form?

Any advice and insight into this problem will be greatly
appreciated...
Vyyk
 
Vyyk Drago said:
Hi,

I'm trying to write a procedure where Excel will
automatically add a certain number of TextBoxes to a
UserForm based on the number of rows in a table. Can
this be done?

Yes but it may not be the best approach

A grid control may work better or you may find it better
to have a form with pre-defined text boxes and on which
you make visible only as many as you require
Also, can a form be created on the fly
using code and how are commands assigned programmatically
to the controls on such a form?

Yes but again I dont recommend it , its far better to
use a grid where you need a table IMHO

Keith
 
Back
Top