Private Python2VBText As New TextBox Private n As Integer Public Sub Routine2 Dim s As String ' first use of a variable for index values s = "word" Python2VBText.Text = Python2VBText.Text + "The full string is: "+ s + vbNewLine Python2VBText.MultiLine = True Python2VBText.Width = 200 Python2VBText.Height = 100 Form1.Controls.Add(Python2VBText) n = len(s) for i = 0 To n - 1 Python2VBText.Text = Python2VBText.Text + vbNewLine Python2VBText.Text = Python2VBText.Text + "i ="+ i.ToString + vbNewLine Python2VBText.Text = Python2VBText.Text + "The letter at index i:"+ Mid(s, i + 1, 1).ToString + vbNewLine Python2VBText.Text = Python2VBText.Text + "The part before index i (if any):"+ Mid(s, 1, i).ToString + vbNewLine Python2VBText.Text = Python2VBText.Text + "The part before index i+2:"+ Mid(s, 1, i+2).ToString + vbNewLine Next End Sub