code 1
code 1
currentSelection = ComboBox1.Value
' Remove the previous ComboBox1 selection from TextBox2 (if any)
If previousComboSelection <> "" Then
textBoxContent = Replace(TextBox2.Text, " " & previousComboSelection, "")
Else
textBoxContent = TextBox2.Text
End If
' Append the new ComboBox1 selection at the end with a space
TextBox2.Text = textBoxContent & " " & currentSelection