Inserting new node at right place in a treeview control

playtex

New Member
Joined
Jun 21, 2012
Messages
1
Hi All,
I have a treeview control(6.0) on 2007 access form that is showing as below in run time.

Legend : A1,B1,E1,K1 are under Ch1 which is under Parent1

Parent1
-----Ch1
---------------A1
---------------B1
---------------E1
---------------K1

Parent2
-----Ch2
---------------A2
---------------C2
---------------F2
---------------N2




Now, if the user enters in a text box as "D1 " and click add, the D1 should be added right exactly in between
B1 and E1 node. Similarly if the user submits "G2" , it should be added between F2 and N2. If "P2" then the node will be added just below N2.



I am looking for VBA code, please help




Thanks,
playtex
 
Last edited:

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).

Forum statistics

Threads
1,203,508
Messages
6,055,815
Members
444,826
Latest member
aggerdanny

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top