Create Controls using VB

  • Thread starter Thread starter Chris
  • Start date Start date
C

Chris

Hello All,

Is it possible to create a control using VB. I need to be
able to create any type of control including textboxes,
option groups, option buttons, check boxes or combo boxes.

Thanks in advance.
 
Hi Chris

Yes, but only if the form is open in Design View. (See CreateControl in the
help resource of your choice).

You cannot create controls dynamically while the form is open in Form View,
as you can with control arrays in VB. Your best workaround is to create a
whole bunch of hidden controls and alter their visibility/size/position as
required.
 
Back
Top