LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 100
Default "Method 'Add' of object 'INodes' failed" in TreeView.

I have a TreeView on a UserForm, and a load/reload button.

When the form comes up, the user can click the button which loads the
tree. He can click the button later too, which clears and reloads the
tree. The code for both first and subsequent loads is:

TreeView1.Nodes.Clear
Set MyRoot = TreeView1.Nodes.Add(Text:="The root")
AddManyMoreNodesUnder(MyRoot)
....etc.

Until today, it worked fine every time. I must've done something to
break it.

Now, adding the first (root) node to the tree works once, but on
clearing the tree and doing it again it fails on the Nodes.Add line:

Run-time error '-2147417848 (80010108)'
Method 'Add' of object 'INodes' failed

In the watch window, all properties of TreeView seem to have the same
state both times. Nor is there a problem with TreeView.Nodes--it
exists and count is 0 both times.

I can't think of what else to compare or diagnose.

Anyone?

Thanks.

***
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Error Help - Method "Range" of object "_Worksheet" failed. Alan Smith Excel Programming 3 March 15th 07 06:55 PM
Intermittent Error - Method 'Add' of object 'HPageBreaks' failed Jamey Weare Excel Programming 7 December 28th 06 05:22 PM
Intermittent Error - Method 'Add' of object 'HPageBreaks' failed Jamey Weare Excel Worksheet Functions 1 December 22nd 06 01:40 AM
What is Error "Method "Paste" of object "_Worksheet" failed? vat Excel Programming 7 February 17th 06 08:05 PM
Method 'Add' of object 'CommandBarControls' failed LAF Excel Discussion (Misc queries) 0 September 12th 05 02:02 PM


All times are GMT +1. The time now is 09:43 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"