This project has moved and is read-only. For the latest updates, please go here.

invalidatecontrol returning a nullreferenceexception

Sep 30, 2013 at 11:14 PM

I am trying to invalidate the ribbon UI when a task pane closes and change the checkbox to false/unticked. I created the following event however the InvalidateControl is throwing a nullreferenceexception.

Private Sub myCustomTaskPane_VisibleChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles myCustomTaskPane.VisibleChanged
r.ribbon.InvalidateControl("Checkbox1" = False)
End Sub

I have created an instance of the Ribbon1 called r. I have also created in the Ribbon1.vb the callbacks getPressed and onAction

Any thoughts on how to get around the nullreferenceexcdeption

Oct 2, 2013 at 8:27 PM
it looks like r or r.ribbon is null(nothing in vb)
i cant see what is r and where it comes from.
i need more code to see or a sample project.