Results 1 to 4 of 4

Thread: Blank Form

  1. #1

    Thread Starter
    New Member
    Join Date
    Sep 2002
    Posts
    10

    Blank Form

    Show a new Blank Form using Code

    Ej.

    Programming a CommandButton that show a new Form without using Add Form in Visual Basic

    I'm try this

    dim frmC as form
    set frmC = new Form
    but this don't work

    I know that I can put
    set frmC = new Form1 but this show all element in the form1 and if I change the name of form1, this make and error.
    I need that when click the button appear a new Blank Form.

    I need this to implement my Activex Control.

    Send me an email to [email protected]

  2. #2
    Junior Member
    Join Date
    Aug 2002
    Location
    Brazil
    Posts
    29
    I think it will work.
    VB Code:
    1. dim frmC as form
    2. set frmC = new Form
    3. frmC.show

    Using the code you listed just create a new FORM object, but it's not explicit you want to show it.

  3. #3

    Thread Starter
    New Member
    Join Date
    Sep 2002
    Posts
    10
    Nop, this not work
    this give a compile error
    Invalid use of New Keywork

    if I put

    Dim frmC as form
    set frmC = new Form1
    frmc.show

    this work but when I change the name of the form, this give an error

  4. #4
    Fanatic Member holly's Avatar
    Join Date
    Aug 2002
    Location
    Somewhere on earth
    Posts
    721
    Originally posted by juanki23
    Nop, this not work
    this give a compile error
    Invalid use of New Keywork

    if I put

    Dim frmC as form
    set frmC = new Form1
    frmc.show

    this work but when I change the name of the form, this give an error
    #

    You will have to change your code to suit your form names

    holly

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