Please Help Me! I'm Getting this error:

Error 2 C:\Users\Nick\Documents\Visual Studio 2010\Projects\HTMLGrabber\HTMLGrabber\Form1.vb 143 'System.Data.Keywords' is not accessible in this context because it is 'Friend'. 38 HTMLGrabber

My current code is:

 Public Sub RichTextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RichTextBox1.TextChanged
        Dim line As Integer = RichTextBox1.GetLineFromCharIndex(RichTextBox1.SelectionStart)
        Dim selStart As Integer = 0
        Dim selEnd As Integer = -1
        Dim caret As Integer = RichTextBox1.SelectionStart
        Dim ch As Char
        Dim word As String
        If RichTextBox1.Lines.Length <= 0 Then Exit Sub
        For i As Integer = 0 To RichTextBox1.Lines(line).Length - 1
            ch = RichTextBox1.Lines(line).Chars(i)
            If Not Char.IsLetter(ch) Then
                If selStart = -1 Then
                    selStart = i + 1
                    selEnd = i
                    ' Do selection Check
                    word = RichTextBox1.Lines(line).Substring(selStart, selEnd - selStart)
                    If Array.IndexOf(Keywords, word) <> -1 Then
                        RichTextBox1.Select(selStart, selEnd - selStart)
                        RichTextBox1.SelectionColor = Color.Blue
                        RichTextBox1.SelectionStart = caret
                        selStart = i + 1
                    End If
                End If
            End If
        Next i
    End Sub
End Class

Please Help!

Edited by Uniquenickfj

5 Years
Discussion Span
Last Post by Uniquenickfj
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.