title: Setting Checked On NodeCheck Event
body: <p>Setting the checked property during the <code>NodeCheck</code> event has been causing it to revert to its previous state. </p>
  
  <p>For example:The node is checked, and the event below gets fired. It finds that the node is checked and sets it to be false. If I walk through the code with a break, the node will reflect this in the user interface. Although, as soon as the code hits the end sub, the checkbox will jump back to being set to true.</p>
  
  <pre><code>Private Sub treeviewExample_NodeCheck(ByVal Node As Object)
       If Node.Checked = True Then
              Node.Checked = False
       ElseIf Node.Checked = False Then
              Node.Checked = True
       End If
  end sub
  </code></pre>
  
  <p>How do I set the checked property during the <code>NodeCheck</code> event?</p>
  
  <p>I have tried the solution <a href="http://www.pcreview.co.uk/forums/treeview-resetting-node-checkbox-vba-code-t3067739.html" rel="nofollow">here</a> that sets the node to a local or global variable and then sets it, and it does the same thing. </p>