Look into Activator.CreateInstance(). This has been asked before. Do a
search for more detailed examples.
--
-C. Moya
www.cmoya.com
"Maurice" <hmoviat@nospam.nospam> wrote in message
news:Xns9770A5BB9E1ACmauricemertens@194.109.133.24 2...[color=blue]
> "Armin Zingler" <az.nospam@freenet.de> wrote in
> news:uDJYz8iNGHA.3856@TK2MSFTNGP12.phx.gbl:
>[color=green]
>>
http://msdn.microsoft.com/library/de...y/en-us/cpguid
>> e/html/cpconemittingdynamicassemblies.asp[/color]
>
> Hi Armin,
>
> I have 2 different forms inside my project:
> frmTest
> frmCompany
>
> I can declare a new form by using the code:
> dim frm as new frmTest
> OR
> dim frm as new frmCompany
>
> What I want is that when I have a string with the form name (strFormName)
> I
> can use this string to declare the new form.
>
> strEval = "Dim frm as new " & strFormName
>
> Something like this. So the string above (strEval) will be executed as a
> line of code.
>
>
>
>
>
>[/color]