Dynamically loading forms based only on a string

Posted on 2006-06-02
Last Modified: 2010-04-23
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
Question by:glass_snake
    LVL 96

    Expert Comment

    by:Bob Learned
    .NET version?



    Accepted Solution


    Author Comment

    Version 1.1.

    Thanks, drquan, that did it!

    Featured Post

    Find Ransomware Secrets With All-Source Analysis

    Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

    Join & Write a Comment

    Article by: Kraeven
    Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
    Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
    Need more eyes on your posted question? Go ahead and follow the quick steps in this video to learn how to Request Attention to your question. *Log into your Experts Exchange account *Find the question you want to Request Attention for *Go to the e…
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now