B
big_trog
Running Visio 2003 Pro standalone.
The scenario:
I have a group G that contains shapes A001, B, and C.
Each of these shapes contains cell formulas that
reference custom property values in the parent group.
I've written a macro that drops a specified (by the user)
number of additional copies of A001 into the group (using
the DropMany() method) and sets the names of the new
shapes to A002, A003, etc. So far, so good.
The problem:
The cell formulas for new shapes lose their references to
to the custom properties in the parent group during the drop.
Is there any way to preserve external cell references during
a Drop() or DropMany() operation?
Alternatively, is there any way for a shape sheet to reference
a cell in the shape's parent without knowing a priori what the
name of the parent is? (One can reference page cells as
ThePage!cellName or document cells as TheDoc!cellName;
it'd be great to have a syntax such as TheParent!cellName.)
(The workaround is to have the macro copy the affected
cell formulas into the new shapes. However, this is less
than ideal for two reasons: 1) Performance suffers if the
number of specified copies is large, and 2) I'd prefer that
the macro not have any knowledge of the copied shape's
cell formulas, since I want to reuse this macro for more
than one kind of shape.)
The scenario:
I have a group G that contains shapes A001, B, and C.
Each of these shapes contains cell formulas that
reference custom property values in the parent group.
I've written a macro that drops a specified (by the user)
number of additional copies of A001 into the group (using
the DropMany() method) and sets the names of the new
shapes to A002, A003, etc. So far, so good.
The problem:
The cell formulas for new shapes lose their references to
to the custom properties in the parent group during the drop.
Is there any way to preserve external cell references during
a Drop() or DropMany() operation?
Alternatively, is there any way for a shape sheet to reference
a cell in the shape's parent without knowing a priori what the
name of the parent is? (One can reference page cells as
ThePage!cellName or document cells as TheDoc!cellName;
it'd be great to have a syntax such as TheParent!cellName.)
(The workaround is to have the macro copy the affected
cell formulas into the new shapes. However, this is less
than ideal for two reasons: 1) Performance suffers if the
number of specified copies is large, and 2) I'd prefer that
the macro not have any knowledge of the copied shape's
cell formulas, since I want to reuse this macro for more
than one kind of shape.)