Managing shapes in a WorkSheet ?

keldsor

Board Regular
Joined
Jun 9, 2017
Messages
52
As a part of a genealogy system I want to manipulate the shapes in a family tree.

The rectangles for the PERSONs are named by a PersonID - in the attaced file 29,36 for father and mother and 37,51 for the children.

The triangle representing the couple is named "29+36" - the Id of the father and the mother.

I have not given the arrows names/ID's - I don't even know if I can give them names ... but I've given them some TIPs to show that couples are married and they get some children - the code is all there, take a look !

There are code to create the rectangles for the persons, but it's done automaticly from Access by running the Sub showPerson(...).

Too there are code to move shapes up/down/left/right and a lot of other sub's - just take a look in the VBA section.

There are code to move selected shapes too - BUT I've experienced it's no good idea to select ARROWS for moving - they often loose the connection to the begin/ending points !


I want to be able BY VBA to select a bunch of shapes by just calling a sub - something like:

selectBunchFrom( < name/ID of an arrow > )

In the attached file there is an arrow from a (not shown) ancestor to the Person Id=29 and by calling the sub with that arrow as argument I want to select the 4 rectangles and the triangle - NOT THE ARROWS !

I think someone here can reveal the code for traversing the "kind of tree structure" represented at the end of the arrow from the not shown ancestor.

Hope you understand my explanation ... and want to take the challange ... I simply CAN'T figure out how it's done !


Arrrrrrggggghhhhhhh ... how can I attach an Excel file with code in it ???????
 
Last edited:

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)

Forum statistics

Threads
1,224,823
Messages
6,181,173
Members
453,021
Latest member
Justyna P

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