i want to insert text in textbox at specific location(i.e row 2 column 3).how can i do that ?

i tried this but its not working

Me.RichTextBox1.Text = Me.RichTextBox1.Text.Insert(i, CChar(cb.Text))

You can replace text by setting the properties SelectionStart and SelectionLength then replacinig the selected text by assigning the replacement string to SelectedText. If you set SelectionLength to 0 then the text is inserted at the given point. For example, to insert a string at position 20, do

RichTextBox1.SelectionStart = 20
RichTextBox1.SelectionLength = 0
RichTextBox1.SelectedText = "inserted string"
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.