Controls.Add is your option here! You don't need to know how many controls will be added. See this article:
http://support.microsoft.com/default.aspx?scid=kb;en-us;190670>I have a db that stores parameter requirements for running different Crystal Reports. Each Report has different parameter requirements and can have multiple parameters. I want to add one control for each parameter requirement to a form. I understand that I can use control.add but I do not know how many controls are required until the db is read at runtime. The problem is that I can't Dim each control in design time not knowing how many controls I need. Is there a way to work around this?
>
>Thanks
>
>Nichole
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com