title: Access VBA - TreeView Control - AfterLabelEdit Event
body: <p>I've got a treeview control in my form. I would like to be able to edit the node in the tree and push the change to Access DB. However, I'm having trouble finding an appropriate event. <a href="http://msdn.microsoft.com/en-us/library/system.windows.forms.treeview_methods.aspx" rel="nofollow">MSDN treeview events reference page</a> advices <em>AfterLabelEdit</em>, but I am not able to get it to work. Is anyone aware of any workaround/solution?
  Snippet of the code I use (I've added <em>onClick</em> and <em>onDblClick</em> for comparison, as they work):</p>
  
  <pre><code>Private Sub xMyTreeview_Click() 'OK
   testit
  End Sub
  Private Sub xMyTreeview_DblClick() 'OK
   EditLabel
  End Sub
  
  Private Sub xMyTreeview_AfterLabelEdit() 'Problem
   AfterLabel
  End Sub
  
  Sub EditLabel()
   Me.xMyTreeview.StartLabelEdit
  End Sub
  
  Sub AfterLabel()
   MsgBox prompt, vbOKOnly, "afterlabel"
  End Sub
  
  Sub testit()
   Dim nodSelected As MSComctlLib.Node ' a variable for the currently selected node
  
   Set nodSelected = Me.xMyTreeview.SelectedItem ' get the currently selected node
  
   NodesStrLength = Len(nodSelected.Key)
   Dim NodeStr As String
   Dim StrToChange As String
   StrToChange = nodSelected.Key
   NodeStr = Mid(StrToChange, 2, NodesStrLength - 1)
  
   Me.txtNodeID = NodeStr
   Me.sfrmDOCNODE.Visible = True
  End Sub
  </code></pre>