Visio Guy

Visio Discussions => Programming & Code => Topic started by: nashwaan on July 18, 2011, 07:09:08 AM

Title: (Solved) How can we change back a de-linked cell to inherited?
Post by: nashwaan on July 18, 2011, 07:09:08 AM
A dropped shape from a master will have all its cells formula inherited from its master.
If we manually change any formula of the dropped shape, then we will have a local copy of the formula in the dropped shape (Of course, the same cell's formula in the master will not be affected). In the ShapeSheet, the color of the formula will change from black to blue to denote formula has been de-linked (not inheriting) from its master

Is there a way in Visio GUI or VBA to reset a cell's formula so that it will inherit the formula from its master again?

Even a Yes/No answer is enough for me.

Thanks,
Yousuf.
Title: Re: How can we change back a de-linked cell to inherited?
Post by: JuneTheSecond on July 18, 2011, 08:48:53 AM
Please, try to delete your blue formula on the cell, then I think there remains original black formula.
Title: Re: How can we change back a de-linked cell to inherited?
Post by: nashwaan on July 19, 2011, 05:07:54 AM
Yes, it works on Visio GUI. I selected the blue formula and hit <Delete> on keyboard and it changed back to black :)

It also works using VBA. For example, i changed Fill Foreground color of a dropped shape and then executed the following code:
ActiveWindow.Selection(1).Cells("FillForegnd").Formula = ""
and the formula of the FillForegnd has reverted to original (Master) formula. I.e form blue to black.

Thanks alot JuneTheSecond.  8)