Are you certain the active control is a RichTextBox when you call that? The way you're ''supposed'' to do it is like so:

Code:
RichTextBox1.Text = RichTextBox1.Text.Replace(Me.TextBox1.Text, Me.TextBox2.Text)