I have a combo box and textbox.
The combo box will have options for user to chose.
Textbox1 has text:- "Troubleshooting Steps:" set in properties of the textbox.
If user Selects: "Rebooted PC" from combo box list, then presses a button it will add the text after"Troubleshooting Steps:".
Example: "Troubleshooting Steps: Rebooted PC". what i want to be able to do is add multiple selects one after other.
Example: Troubleshooting Steps: Rebooted PC- Problem returned after reboot- Replaced part
Id some googling and found this code which ive changed to do part of it.
But the problem i have it adds the last text selected "Troubleshooting Steps:" pushing the first text selected to the end.
Whats Happening Example: Troubleshooting Steps: (3rd)Replaced part- (2nd)Problem returned after reboot- (1st)Rebooted PC
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim text As String = TextBox1.Text
Dim index As Integer = text.IndexOf("Troubleshooting Steps:")
Dim countChars As Integer countChars = "Troubleshooting Steps:".Length
If index >= 0 Then
text = text.Insert(index + countChars, ComboBox1.Text)
TextBox1.Text = text