View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Jim Luedke Jim Luedke is offline
external usenet poster
 
Posts: 43
Default TreeView.Nodes.Clear crashes Excel 2002.

When, that is, TV.Visible = False.

Actually, the crash doesn't seem to happen right on the .Clear, but
when you try to add a new node to a cleared-while-hidden TV.

I'm too embarrassed to say how long it took me to think of this cute
but obvious fix:

Push TV.Visine, set to True, .Clear, then pop it again.

It should all happen fast enough not to see on-screen.

***

What about .Nodes.Remove, you ask?

Cheerfully fails too, when TV.Invisible. Only it doesn't crash Excel.

***