I have this bit of code
When I am in the rtb and click on spell check button it tells me the errorCode:Private Sub SpellChkMenuItem_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles SpellChkMenuItem.Click Dim activeRichTextBox = TryCast(Me.ActiveControl, RichTextBox) 'clsFS.CheckSpelling(activeRichTextBox) 'clsFS.SpellAndGrammarCheck(activeRichTextBox) If Len(activeRichTextBox.Text) > 0 Then SpellChecker.Text = activeRichTextBox.Text SpellChecker.SpellCheck() Else MsgBox("Text box is empty") End If End Sub
"Object reference not set to an instance of an object."
On this line
SpellChecker.Text = activeRichTextBox.Text
But it is suppose to be getting the focused rtb correct? So why is it not referenced




Reply With Quote