The node returned is denoted by the property name. Node If Me.tvwMain. Then 'Check for children nodes. Child 'Get first child node. Then 'This is the last node.
Exit Do Else 'Get the next node.
If End Sub Figure 5-60 displays a TreeView control with six node objects. When provided with x and y coordinates, the HitTest method will return a Node object if there is one at those coordinates. Otherwise, Nothing will be returned. When the StartLabelEdit method is called, the caption of the node becomes both editable by the user and selected. This is unnecessary when the LabelEdit property is set to tvwAutomatic .