Results 1 to 5 of 5

Thread: One step past creating forms during runtime

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jul 1999
    Posts
    77

    Unhappy One step past creating forms during runtime

    I know how to create forms during runtime, using a form that is already made, of course, but...

    How do I do something like this:
    (this doesn't work)
    ----------------------------
    Dim frm(I) As Form
    Set frm(I) = New frmMain
    frm(I).Show
    ----------------------------

    VB Does not seem to allow having an integer variable there. For some reason it must be a number. How do I get past this problem?

  2. #2
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    VB Code:
    1. Dim frm(I) As Form
    This is your problem line. C won't let you do this either, you need to do:
    VB Code:
    1. Dim frm() As Form
    2. Redim frm(I) As Form
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  3. #3
    Megatron
    Guest
    You don't need an Index
    VB Code:
    1. Dim frm As New Form1
    2. frm.Show

  4. #4
    Member surfmstr's Avatar
    Join Date
    Feb 2000
    Location
    St Louis, MO USA
    Posts
    48

    Cool

    Megatron is totally and absolutely right (as usual).
    The surfer!
    [email protected]

    There come's a time in the affairs of a man when he must take the bull by the tail and face the situation.

    - W. C. Fields

  5. #5
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    But it didn't answer the question, because they already knew how to do that
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

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