for next loop doesn’t count last line on a textbox

Like title, more particulary, I have two textbox when user put links when finished the result will be on the second one with some default string in the 0 index of the counter and after the exiting of the loop. My question is how I can make that even the last line will be readed in the for loop? Because I was thinking that the problem will be in the temparray=textbox1.Lines

 tempArray = TextBox1.Lines
        For counter = 0 To tempArray.Length - 1
            If counter = 0 Then
                tempArray(0) = cbname2
            ElseIf counter = 1 Then
                tempArray(1) = "~!" & "img(" & tempArray(counter) & ")"
            ElseIf counter >= 2 Then
                tempArray(counter) = "img(" & tempArray(counter) & ")"
            End If
            TextBox2.Lines = tempArray
        Next
        TextBox2.Text &= vbCrLf & "!~" & " ~~~"
    End Sub