Results 1 to 8 of 8

Thread: [RESOLVED] Instantiate a Form by it's name

Threaded View

  1. #1

    Thread Starter
    Fanatic Member simonm's Avatar
    Join Date
    Sep 2000
    Location
    Devon, England
    Posts
    796

    [RESOLVED] Instantiate a Form by it's name

    I am trying to find a way to instantiate a form by it's name which will be contained in a string variable.

    i.e. Instead of doing this:
    VB Code:
    1. Dim frm As frmDetails
    2. frm = New frmDetails
    I want to do something like this:
    VB Code:
    1. Dim frm As Form
    2. Dim strFormName As String
    3.  
    4. strFormName = "frmDetails"
    5. frm = InstantiateForm(strFormName)
    "InstantiateForm" is obviously made up but you get the drift...Something a bit like what the old VB6 CreateObject function used to do.
    Last edited by simonm; Jan 10th, 2007 at 07:30 AM.
    Everything I say is either loose interpretation of dubious facts or idle speculation rooted in irrational sentiment.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width