I have a textbox (tInto1) that I have copied a sentence into. I have 10 textboxes to copy the words into, based on their position (that is 1st word goes into textbox1, 2nd word goes into textbox2, 3rd into textbox 3 till the last word is copied into the last textbox). The code below gives me the number of words in the sentence but not the word, based on its position.
`Dim miLine As String
Dim i As Integer
Dim MiArray() As String
miLine = tInto1.Text
MiArray = DisLine.Split(" ")
For i = 0 To UBound(MiArray)
if i=0 then
txtbox1.text = i
elseif i=2 then
textbox2.text = i
elseif i=3 then
textbox3 = i
.
.
. 'for the other 6 elseif statements.
else
textbox10 = i
Next`
Help will be greatly appreciated.
If your textboxes are named by number, you can try something like this: