Results 1 to 5 of 5

Thread: Help...

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jan 2002
    Location
    Michigan
    Posts
    143

    Help...

    Im kinda new to vb 6.0 but..im trying to do smoething really easy

    i have 2 text boxes.. and a command button

    i want to input a number into the first one..and when click the command button...have it spit out that same number in text box 2?

    How do I do this?

  2. #2
    Stiletto
    Guest
    Just input a number to Text1.Text and pu this code:
    VB Code:
    1. Private Sub Command1_Click()
    2. Text2.Text = Text1.Text
    3. End Sub

  3. #3
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    VB Code:
    1. Private Sub Form_Load()
    2.   Text1.Text = inputbox("Enter number:")
    3. End Sub
    4.  
    5. Private Sub Command1_Click()
    6.   Text2.Text = Text1.Text
    7. End Sub
    My evil laugh has a squeak in it.

    kristopherwilson.com

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Jan 2002
    Location
    Michigan
    Posts
    143
    Ok thanx.

    One last question:

    What if I have 3 different text boxes on a form and then another one beneath the top 3. I want to input 3 values into each one of the top 3 text boxes. then in the 4th text box i want the quadratic equation A*X*X+B*X+C=0 to come out where
    A = the first text box B= the second text box and C= the 3rd one.

    so basically it if u enetered 3 4 5 into each one of the text boxes and hit the compute button it would spit out: 3*X*X+4*X+5=0 into the 4th text box.

    thanx!

  5. #5
    INXSIVE Bruce Fox's Avatar
    Join Date
    Sep 2001
    Location
    Melbourne, Australia
    Posts
    7,429
    VB Code:
    1. Text4 = val(Text1.Text)*x*x+val(Text2.Text)*x+val(Text3.Text)

    ?Close!!!
    ________
    Housewives Webcams
    Last edited by Bruce Fox; Aug 14th, 2011 at 04:06 AM.

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