Create Controls using VB

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.
 
G

Graham Mandeno

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top