Dynamically loading forms based only on a string
Posted on 2006-06-02
I have a combobox with form names in it. I would like to take the text name of those forms, hit an event handler, and dynamically load the selected form. Unfortunately, I keep getting stuck. I'm looking for something along the lines of the code I wrote below (though obviously it doesn't actually work).
Thanks in advance for any help!
Dim x as string
x = "Form2"
Dim obj as object
obj = CType(obj, gettype(x)).ShowDialog