How do you solve this issue in VB.NET on this section below?
startindex = RichTextBox1.Find(checkWord, startindex, RichTextBox1.TextLength, RichTextBoxFinds.WholeWord)
Value cannot be null. Parameter name: str
Here is the code
Private Sub btnFind_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnFind.Click
Dim startindex As Integer = 0
If RichTextBox1.Text.Length > 0 Then
startindex = RichTextBox1.Find(checkWord, startindex, RichTextBox1.TextLength, RichTextBoxFinds.WholeWord)
End If
' If string was found in the RichTextBox, highlight it
If startindex >= 0 Then
' Set the highlight color as red
RichTextBox1.SelectionColor = Color.Red
' Find the end index. End Index = number of characters in textbox
Dim endindex As Integer = checkWord.Length
' Highlight the search string
RichTextBox1.Select(startindex, endindex)
' mark the start position after the position of
' last search string
start = startindex + endindex
End If
End SubKelvin Nyota From Researchpaperstobuy.com









