Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,452
Default Traverse treeview bottom to top

Using Excel 2002.
Could anybody give me an example how to traverse a treeview from bottom to
top?
It has to start at a given node and it has to move through the treeview has
it appears on the screen.
In other words the order of the nodes is with increasing distance from the
bottom of the application.
I have a recursive function that moves top to bottom, but I can't figure out
the other way round.
Thanks for any assistance.


RBS

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 70
Default Traverse treeview bottom to top

Hi,

I think the answer is "with considerable difficulty". The problem is that
when you pop up to the .Parent node, you then have to traverse back down the
tree again to get the item immediately above the "target" item.

Given that you've got it working from top to bottom (which does lend itself
to effiicient recursion), why don't you use that code and just reverse the
order when you've finished?

Just a thought,

Peter Beach


"RB Smissaert" wrote in message
...
Using Excel 2002.
Could anybody give me an example how to traverse a treeview from bottom to
top?
It has to start at a given node and it has to move through the treeview

has
it appears on the screen.
In other words the order of the nodes is with increasing distance from the
bottom of the application.
I have a recursive function that moves top to bottom, but I can't figure

out
the other way round.
Thanks for any assistance.


RBS



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,452
Default Traverse treeview bottom to top

Good thought.
I could traverse down, store the nodes in an array and use that to go the
other way.
Will give that a go.

RBS

"Peter Beach" wrote in message
...
Hi,

I think the answer is "with considerable difficulty". The problem is that
when you pop up to the .Parent node, you then have to traverse back down

the
tree again to get the item immediately above the "target" item.

Given that you've got it working from top to bottom (which does lend

itself
to effiicient recursion), why don't you use that code and just reverse the
order when you've finished?

Just a thought,

Peter Beach


"RB Smissaert" wrote in message
...
Using Excel 2002.
Could anybody give me an example how to traverse a treeview from bottom

to
top?
It has to start at a given node and it has to move through the treeview

has
it appears on the screen.
In other words the order of the nodes is with increasing distance from

the
bottom of the application.
I have a recursive function that moves top to bottom, but I can't figure

out
the other way round.
Thanks for any assistance.


RBS




Reply
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
survey traverse computations SRH Excel Discussion (Misc queries) 0 February 27th 10 01:54 AM
traverse data based on 2 conditions olga Excel Discussion (Misc queries) 5 January 9th 07 04:12 PM
TreeView in Excel VBA [email protected] Excel Discussion (Misc queries) 4 November 8th 06 04:03 PM
TreeView Object bach New Users to Excel 1 August 15th 05 02:51 PM
Description of Listview and Treeview Controls Frank[_12_] Excel Programming 1 August 14th 03 08:40 AM


All times are GMT +1. The time now is 10:12 PM.

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

About Us

"It's about Microsoft Excel"