Hi Denis.
>But when it gets to the addition of the "Test2" group then I receive the error that I mentioned in my original post. loGroup is not initialized properly. So if I understand this error correctly it tells me that no node for "Test" was not created but what I don't get is why I did'nt get an error message for the creation of that "Test" group.
It looks like the code in AddGroup isn't adding the parent node if it doesn't exist. Try replacing the assignment to loParent with the following:
if type('toTree.Nodes[lcParent]') <> 'O'
loParent = toTree.Nodes.Add(, 1, lcParent, substr(lcParent, 2), 1)
else
loParent = toTree.Nodes[lcParent]
endif type('toTree.Nodes[lcParent]') <> 'O'
Doug