View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ernst Ernst is offline
external usenet poster
 
Posts: 1
Default moving treeview node

Hi experts,

From Stephen Bullens dragdropexample I learned how to move nodes in a
treeview using drag and drop in the treeview.
All I have to do is give a node a new parentnode.
This code is used to do this:

Set moDragItem.Parent = oParent

When I do this the draged node becomes the first childnode of its new
parent.
When I add a node it becomes the last childnode of the parent.

I want to move a node to a specific position between other childnodes, by
drop while pressing the control-button.

I tied this with the following code:

Set moDragItem.Next= oParent
or
Set moDragItem.Previous= oParent
or
Set oParent.Previous= moDragItem
or
Set oParent.Next= moDragItem

None gave me the expected result.

Because the childnodes represent different types, it is not an option to add
a node en rename alle the childnodes.
Does anyone have a solution to this issue?

Kind reagrds Ernst