Some VB help v.calingforms

Discussion in 'OT Technology' started by Lusankya, Feb 8, 2007.

  1. Lusankya

    Lusankya Just try and eat me, bitch.

    Joined:
    Sep 14, 2003
    Messages:
    579
    Likes Received:
    0
    Location:
    NS, Canada
    I'm still using VB6. I like it better [​IMG]
    Anyway, I've got a string that contains the name of a form I need to pass a .Show command to, but I can't do it the easy way...

    Dim strCallForm as String
    strCallForm = "frmRoflcopter"
    strCallForm.Show
    Fail. [​IMG]

    With strCallForm
    .Show
    Also fail. :o


    Ideas?
    I'm loking into CallByName, but I don't think I'm using it right...
     
  2. michelin man

    michelin man IDB Construction

    Joined:
    Jul 22, 2001
    Messages:
    11,660
    Likes Received:
    0
    Location:
    Austin
    not sure if this will work in "old" vb

    dim X as FormName
    x.show

    or

    Public Sub shwFrm(ByVal frm As Form)

    frm.Show

    End Sub
     

Share This Page