I have a situation where a user is double clicking on a treeview node. I need to test to see if the node is a root/parent or a child. Currently, if the node is a child and has a parent the values TreeView1.SelectedItem.Parent.Text and TreeView1.SelectedItem.Key have a "value". If the parent end doesn't exist or the child is in fact a parent I get the error <Object variable or With block variable not set>.
So, I'd like to test the parent to see if it's value is <Object variable or With block variable not set>. HOWEVER, testing to see if it is "Nothing" or Null doesn't work.
Any ideas? This has been driving me crazy all day!!