If x(0) <> Empty Then
Combo14.Text = Text2.Text
If UBound(x) Then
Combo14.Text = x(0)
Else
If UBound(x) Then
Combo14.Text = x(1)
Else
If UBound(x) Then
Combo14.Text = x(2)
End If
The above sequence does not make much sense. If there is at least one word in your original string then you set the
Text
item of the combo box to the complete string. You then check if there is more than 1 substring in the array, and if so you try to set it to each three separate items.
Take a look at
the documentation[
^] to check what you want to do.