Ok, this should work then. When Command1 is clicked, it moves the I-Bar to the start of the 4th line (index of line is 3 as base 0) of text1.
Private Sub Command1_Click()
With Text1
.SelLength = 0
.SelStart = GetLineStart(Text1.Text, 3)
.SetFocus
End With
End Sub
Private Function GetLineStart(ByVal nText As String, ByVal nLine As Integer) As Integer
' Returns the starting character (base 0)
' of line nLine (base 0) of nText
Dim nLines() As String
Dim nLineEnum As Integer
Dim nLinePos As Integer
nLines = Split(nText, vbNewLine)
For nLineEnum = 0 To sUbound(nLines)
If nLineEnum = nLine Then
GetLineStart = nLinePos
Exit For
End If
nLinePos = nLinePos + Len(nLines(nLineEnum) & vbNewLine)
Next
End Function
Private Function sUbound(ByRef What() As String) As Integer
' Returns ubound of what or -1 if empty
On Error GoTo UnDimensioned:
sUbound = UBound(What)
Exit Function
UnDimensioned:
sUbound = -1
End Function