Reference to parent in spreadsheet

I

Istvan

I am making an action to my master shape as:
=SETF(GetRef(Sheet.12!EndX),"Sheet.11!Controls.Row_1")

Sheet.12 is the child what Sheet.11 is the parent when editing the master
shape. When I drop some of my master to a page Sheet.12 is substituted by
visio automatically with new values, but Sheet.11 not.
I figured if I could refer to the parent of shape instead hardwiring
Sheet.11 it would work. Can it be done?
 
J

JuneTheSecond

Sure, "Sheet.11!Controls.Row_1" is evaluated as formula in EndX cell just
after it is located there by the SetF function. So, "Sheet.11" is correctly
rewrited in EndX, when the master shape is dropped on the drawing page.
 
I

Istvan

No, Sheet.11 is not substituted at drop as Sheet.12. I suppose because
Sheet.11 appear as part of string. So If I drop several master on a page then
all have an action cell such:
=SETF(GetRef(Sheet.ABC!EndX),"Sheet.11!Controls.Row_1")
where ABC is generated by the system.

JuneTheSecond said:
Sure, "Sheet.11!Controls.Row_1" is evaluated as formula in EndX cell just
after it is located there by the SetF function. So, "Sheet.11" is correctly
rewrited in EndX, when the master shape is dropped on the drawing page.

I am making an action to my master shape as:
=SETF(GetRef(Sheet.12!EndX),"Sheet.11!Controls.Row_1")

Sheet.12 is the child and Sheet.11 is the parent when editing the master
shape. When I drop some of my master to a page Sheet.12 is substituted by
visio automatically with new values, but Sheet.11 not.
I figured if I could refer to the parent of shape instead hardwiring
Sheet.11 it would work. Can it be done?
 
M

Mark Nelson [MS]

There is not a way to dynamically refer to the parent of a shape, as in:
MyParent!Width.

SetF has issues with formula substitution because Visio doesn't know the
contents of the string are a formula until the SetF is triggered. That
means your formula misses out on the critical sheet fix-ups that occur when
the master is instanced.

You may be able to accomplish your task without using SetF, but it's not
clear what you want to accomplish. One scenario is that you want to
synchronize two cells, such as the end point of a line and a control handle.
The user should be able to change either cell via the user interface, and
the formulas should synchronize the other cell. You can use SETATREF for
this behavior. For example, in your Controls.Row_1 cell enter:
=SETATREF(Sheet.12!EndX)

--
Mark Nelson
Office Graphics - Visio
Microsoft Corporation

This posting is provided "AS IS" with no warranties, and confers no rights.
 
J

JuneTheSecond

Then, please try to remove quatation,,,,
=SETF(GetRef(Sheet.12!EndX),Sheet.11!Controls.Row_1)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top