Visio Discussions > ShapeSheet & Smart Shapes

Visio List Shape - how to guard PinX and PinY formulas when item added to list?

(1/2) > >>

I have become quite fond of the Visio List Shape functionality, as described here:

(rarely I use a Container/List combo, mostly just a List)

The problem I encounter is that for a solution I need formulas in the List shape for PinX and PinY. However, when a list item (shape) is added to the List shape, PinX and PinY are overwritten with a value and the formula is lost. GUARD()-ing the PinX and PinY formulas doesn't help, the formulas still get erased.

Is there another way to protect the PinX and PinY formulas from this behavior of the list shape when an item is added? Thank you for sharing your ideas for a solution!

Yes, the setatref group of functions should help.
Wapperdude has written a nice post about them.

Thank you Yacine checked out the MS info on SETATREF():

That should work will read up on it from Wapperdude's article as well thank you!

By the way, is there also a DEPENDSON() that fires when a formula changes (not just the resulting value)? That would be pretty useful in some cases.

My guess is maybe.  Dependson()  is based upon a change in the reference cell.  Presumably, that means the cells value.  But what if  setf() or vba places a new formula?  I'm not sure.  Try a simple test case.  Say set a shape"s width to some value only when color changes.  This allows you to enter a color from GUI, or edit shape sheet to use setf() to enter an RGB  value, or use code to place a formula.


[0] Message Index

[#] Next page

Go to full version