That seems to be what I need, but I'm having issues with the Type.GetType. It works fine if the Type is defined within my project but not if it is contained in a DLL reference. When specifying a Type out of a DLL, the Type.GetType returns a null. The reference itself is working, since I can hard-code the Dim statement. My best guess is that I'm not specifying the parameter properly on the Type.GetType, but I can't seem to figure it out.
On Apr 18, 12:59 am, Joe Enos <[email protected]> wrote: > You'll need to do a little more than just "Double", but I think what > you're looking for is Activator.CreateInstance. It accepts a full > type name, or a Type variable, and instantiates an object of that > type. > > You can convert a fully qualified type name to a type of Type by using > the Type.GetType method. > > On Apr 17, 1:11 pm, jtaylor <[email protected]> wrote: > > > I don't think it's possible, but is there any way to use a variable as > > a type in a Dim statement? > > > For example: > > > Dim Field1 as String = "Double" > > Dim Field2 as Field1
