Results 1 to 4 of 4

Thread: NewForm1 as Form1

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jun 1999
    Location
    Garden Grove, CA, USA
    Posts
    110

    Question

    I've created a form named Form1 which contains: 1 textbox.
    a form named form2 which contains: 1 textbox, 1 command button.

    and i made a copy of Form1 through the sub function below:

    Sub NewForm1()
    Dim NewForm1 as Form1
    Set NewForm1 = new Form1
    NewForm1.show
    end Sub

    and i want a to send a text line from Form2's textbox when pressed enter to the textbox in the form created with the above function. How do i do that?

    Helps are very, very, appreciated.
    ngphuocthinh

  2. #2
    Guest
    Code:
    Newform1.text1.text = "New form's text"
    Is that what you mean?

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Jun 1999
    Location
    Garden Grove, CA, USA
    Posts
    110

    Nope

    The code you gave me i've tried many times, and it gives me error: it said object not found.
    ngphuocthinh

  4. #4
    Guest
    In order to use text1 on the new form, the textbox must already be there.

    Try this:

    Code:
    Dim F as New Form1
    F.Show
    F.text1.text = "New Form Text"
    Hope that works.

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