Hi,

I want to populate a Userform with Labels of text boxes at runtime.
Also, if possible, I want the number of text boxes to be determined
at runtime. To explain the problem I will use an analogy from Banking
for adding a new customer. The form will have a dropdown box to select
the type of customer. When the customer type is selected,the customer
type value will be looked up in an excel sheet, where for each
customer type the number of text boxes and the label values of the
text boxes would be stored in a row. On selecting a customer type in
the drop down box, the form should get populated with the specified
number of text boxes and the labels displayed. Is this possible? Any
pointers or example code would be of immense help.

Any other way of approaching the problem are also welcome.

Thanks in advance for all the help.

Regards,
Raj

Re: Textbox labels at runtime by RB

RB
Fri Jul 25 12:16:30 CDT 2008

Simplest is to have all the controls there, but set the Visible property to
True or False
depending on your parameters.

RBS


"Raj" <rspai9@gmail.com> wrote in message
news:57e64ee7-2bea-45d8-87cd-72fc6debb79f@a2g2000prm.googlegroups.com...
> Hi,
>
> I want to populate a Userform with Labels of text boxes at runtime.
> Also, if possible, I want the number of text boxes to be determined
> at runtime. To explain the problem I will use an analogy from Banking
> for adding a new customer. The form will have a dropdown box to select
> the type of customer. When the customer type is selected,the customer
> type value will be looked up in an excel sheet, where for each
> customer type the number of text boxes and the label values of the
> text boxes would be stored in a row. On selecting a customer type in
> the drop down box, the form should get populated with the specified
> number of text boxes and the labels displayed. Is this possible? Any
> pointers or example code would be of immense help.
>
> Any other way of approaching the problem are also welcome.
>
> Thanks in advance for all the help.
>
> Regards,
> Raj