I was recently asked how the color of one shape can be changed and for other shapes to be automatically updated to the same color … even if they are on different pages! Well, it is possible with Microsoft Visio’s awesome ShapeSheet formulas. In fact, this capability is not limited to the FillForegnd cell … check out the Microsoft Learn page about SETATREF(…), and view the video below to find out more.
The formula in a ShapeSheet formula of one shape can reference the value of another cell, which can be in a different shape on the same page, or even on a different page.
For example, the formula =Sheet.1004!FillForegnd will get the fill color of the shape with the ID = 1004, and, if this is entered into the FillForegnd cell of another shape, then it will be the same color. This formula could be enclosed in the GUARD(…) function, if you don’t want the color to be changed, or enclosed in a SETATREF(…) function, if you want the color to be updated on either shape to keep them synchronized.
This short video explains how this can be done with the ShapeSheet in Visio …
Of course, it does not have to be limited to the fill color….
Related articles
Creating Boolean Context Menus in Visio
Over the many, many years that I have been creating Microsoft Visio solutions, I have had to create numerous right-mouse context menus for shapes to control their Shape Data values. Over that time, patterns emerge, so this article is highlighting three different appearances for simple Boolean values, otherwise known as True/False or Yes/No values, and…
A visual exploration of Penrose Tiling in Visio
Maybe it is because I used to be a building architect, but I have always been fascinated by the relationship between numbers and visualisations. Perhaps the most famous one is the Golden Ratio which has been used as the basis of many building designs and art pieces. It is often recognised to create a harmony…
How SVG in Visio can cause a Shape.BoundingBox(…) error
I have used Visio’s Shape.BoundingBox(…) for many, many years and I cannot ever recall it failing, but I have now managed to create some shapes that cause it to error. This caused many hours of confusion, so I nearly abandoned using the method, until I discussed it with my fellow Visio MVP, John Goldsmith (see…
Post-Processing Paste from Clipboard in Visio
One of my current Visio VSTO add-in projects requires me to react to users pasting custom shapes in the Visio page from the clipboard. The process involves registering the ExitScope event and then checking the Clipboard contents. Initially, I was merely testing for a line in the DataObject that started with the word “Visio “,…
Are Master Shortcuts useful in Visio?
Many Visio users may not even understand the question, but this almost hidden feature has been available for many years. A Master Shortcut looks like a normal Master in a stencil, but it is merely holds a reference to another Master in a Stencil, not necessarily the same one, and has an option to add…
Jumping between Shapes in Visio
Many Visio diagrams get quite large, and sometimes it is useful to provide the ability to jump to another shape quickly in the same document, either on a different page or on the same one. Although there is an add-on provided in desktop Visio that is used by the Off-Page Reference shape provided in the…