I have a textbox control on my form where I want [] to be placed around each word of the content. The content could be any number of words. For example:
Content:
Crassula ovata Gollum
Becomes:
[Crassula] [ovata] [Gollum]
I've found some code online that splits the string then uses a loop to place [] around each word, but I can't figure out how to concatenate the string back together. Any help would be greatly appreciated. Here is the code I'm using:
Code:
' Button only used for testing. Will use control when the code is sorted.
Private Sub Command63_Click()
Dim wordlist As String
Dim arrayofWords
Dim i
' String only used for testing. Will use control when the code is sorted.
wordlist = "Crassula ovata Gollum"
arrayofWords = Split(wordlist)
For i = LBound(arrayofWords) To UBound(arrayofWords)
arrayofWords(i) = "[" & arrayofWords(i) & "]"
' Don't know what to put here to concatenate.
' MsgBox only used for testing.
MsgBox arrayofWords(i)
Next
End Sub