Hi guys ,
I have a RichTextBox and i'm trying to be able to add links to selected text,
So i've been messing around with the SelectedText but It's not working the way I thought.

Code:
Dim Selection As String = ""
        Dim link As String = ""
        Dim pathC As String = ""

 If RichTextBox1.SelectedText <> "" Then
            Selection = RichTextBox1.SelectedText
            If MsgBox("Would you Like to Add an external link?", MsgBoxStyle.YesNo, "Link type") = MsgBoxResult.Yes Then
                link = InputBox("Type hyperlink", "Type hyperlink", "http://")
                pathC = "<a href=""" & link & """>" & Selection & "</a>"
                RichTextBox1.SelectedText.Replace(RichTextBox1.SelectedText, pathC)
Else
...
End If
 End If
Thanks in advance,
Mike