Not really sure, but I believe that "Len" is from vb6 and might cause issues in the future when used as code in vb.net.
If "Len" is length, then use RichTextBox1.Text.Length .
As for your already solved issue, see if this helps.
Dim iStartIndex, iEndIndex As Integer
With RichTextBox1.Text
iStartIndex = .IndexOf("sid=") + 4
iEndIndex = .IndexOf(""">", iStartIndex)
MsgBox(.Substring(iStartIndex, iEndIndex - iStartIndex))
End With
codeorder
Posting Virtuoso
1,915 posts since Aug 2010
Reputation Points: 255
Solved Threads: 384