VB 2nd

Site, server, even PC probs. put them up.
Post Reply
User avatar
eXg. TrueGift
Forum Master
Posts: 1252
Joined: Thu Sep 03, 2009 10:30 pm
Location: Canada,ON

VB 2nd

Post by eXg. TrueGift »

Alright I have a form with two text boxes, you type in text box two and words come up in text box 1:

Code: Select all

Public Class Form1

    Private Sub TextBox2_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox2.TextChanged
        If TextBox2.Text = "example 1" Then
            TextBox1.Text = "example 2"
        End If
    End Sub
End Class
How do I write it so I can have multiple things come up directly under each other in text box 1?

Example

Code: Select all

Public Class Form1

    Private Sub TextBox2_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox2.TextChanged
        If TextBox2.Text = "example 1" Then
            TextBox1.Text = "example 2"
            textbox1.text = "example 3"
        End If
    End Sub
End Class
But that code is wrong, how do I write it correctly? Asap response would be awesome
Image
Despised or idolized... either way I'm recognized!
Don't be so quick to judge me You only see what I choose to show
User avatar
CaMeL
Doom 3
Posts: 2531
Joined: Wed Sep 05, 2007 3:38 pm
Location: Huntsville, AL

Re: VB 2nd

Post by CaMeL »

eXg. Redempt1on wrote:
But that code is wrong, how do I write it correctly? Asap response would be awesome
Learn the VB syntax and you wont have to ask this question. We are not going to do it for you and no one here will be able to sit down with you and teach you rule by rule how to code vb properly. Syntax is KEY!
User avatar
eXg. TrueGift
Forum Master
Posts: 1252
Joined: Thu Sep 03, 2009 10:30 pm
Location: Canada,ON

Re: VB 2nd

Post by eXg. TrueGift »

eXg. CaMeL wrote:
eXg. Redempt1on wrote:
But that code is wrong, how do I write it correctly? Asap response would be awesome
Learn the VB syntax and you wont have to ask this question. We are not going to do it for you and no one here will be able to sit down with you and teach you rule by rule how to code vb properly. Syntax is KEY!
I been researching it and I haven't found what I needed for my code in particular, and I know how to code..
A lot actually but some of the simple things oddly enough I forget sometimes.
Thanks anyway ..
Image
Despised or idolized... either way I'm recognized!
Don't be so quick to judge me You only see what I choose to show
Post Reply

Return to “Need Help ??”