Shapesheet Data not Applying (FillForegnd)

Started by richtofen, August 20, 2017, 07:02:05 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

richtofen

I'm trying to apply background to a container after it's dropped.
The color value appears as coded in the shapesheet, but it doesn't show up in the diagram
If I make a change (for example, change the pattern using the fill menu, and apply), then the color works, as it appears on the shapesheet.
If I manually change the values in the shapesheet, again, the color doesn't update on the diagram until I press 'apply' on the fill menu.
Any ideas?

Set cont = Application.ActivePage.DropContainer(vsoDoc1.Masters.ItemU("Container 1"), Application.ActiveWindow.Selection)
cont.Cells("FillForegnd").FormulaForceU = 4


I'm on Visio 2010, VBA 14.0

Yacine

When using the UI, the shape and its subshapes get modified. Modifying the shapesheet of the shape, will not modify automatically the properties of the subshapes.
You need to iterate over the subshapes and modify their properties individually.
Yacine

wapperdude

Adding to Yacine...
When you build your grouped shape, if you know that you want the fill colors to match, you can edit shapesheet of each sub shape and enter a formula to match parent shape fill.  For example, if parent is sheet.ppp, then in the subshape's shapesheet, find the Fillforegnd cell and add sheet.ppp!Fillforegnd.

Wapperdude
Visio 2019 Pro