Check if oleTreeView.Nodes.Count is greater then 0.
>I have the following code:
>
>
>Private Sub oleTreeView_Click()
>
> DIM sSelectedItem AS String
>
> If oleTreeView.SelectedItem.Index <> 1 Then
>
> sSelectedItem = oleTreeView.SelectedItem.Text
>
> End If
>
> HideControl
>
>End Sub
>
>
>If there are no nodes in the tree I get an error. How do I test if
>the SelectedItem property contains a node?
>
>Thanks
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com