Results 1 to 3 of 3

Thread: Form1's Textbox

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2002
    Location
    Pilipinas
    Posts
    441

    Form1's Textbox

    I have two forms(Form1 & Form2). Im in the Form2 and i use this code to add text on the Form1's Textbox1 but this code doesn't work.

    Dim aForm As New Form1()
    aForm.TextBox1.Text = TextBox1.Text

    Please check the file attached with this topic before answering this post.
    Attached Files Attached Files

  2. #2
    KrisSiegel.com Kasracer's Avatar
    Join Date
    Jul 2003
    Location
    USA, Maryland
    Posts
    4,985
    I can't check your code because I have a project open that I'm working on. Did you look at my post?

    http://vbforums.com/showthread.php?threadid=254809

    Maybe that will help you

  3. #3
    Addicted Member CoMMiE's Avatar
    Join Date
    Jul 2000
    Location
    Malaysia, Kuala Lumpur
    Posts
    179
    Hi
    Your code does not work because you are creating a new instance of the form, try passing the form obj from form1 to form2 instead
    To follow the path:
    look to the master,
    follow the master,
    walk with the master,
    see through the master,
    become the master.-ZEN

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