Click to See Complete Forum and Search --> : Visual Basic


xuegang
February 19th, 2000, 07:44 AM
Why the following code runs fine in one project but not
in anohter one? The run-time error is "Type Mismatch".
This is understandable sicne what was returned from
treeView1.Listitems.Add() actually was a string but not a NODE.
as expected.

But why does the Add method sometimes return a string instead of a NODE?

In addition, I have the same problem with List View Controls.

Any help is much appreciated.

Thanks.

X.G. Wang

'-------------------------
Dim newNode As Node

treeView1.Nodes.Clear

Set newNode = treeView1.Nodes.Add ( , , "KEY1", "TEXT1")