What this code does is it takes what the user enters into TextBox1 and TextBox2. Upon the click of the button, it takes the two strings and inserts a space between them (or whatever is in the quotes) and displays the strings from the two textboxes in a MsgBox.
You could also use other controls, such as a ComboBox or a ListBox instead of the two TextBoxes or you could even combine both of them or have three of them, but I'll leave that up to you to figure out.
- Code:
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) _
Handles Button1.Click
Dim str1 As String = TextBox1.Text
Dim str2 As String = TextBox2.Text
Dim concat As String
concat = str1 & " " & str2
MsgBox(concat)
End Sub
End Class
You could also use other controls, such as a ComboBox or a ListBox instead of the two TextBoxes or you could even combine both of them or have three of them, but I'll leave that up to you to figure out.