Need some help!
I'm relatively knowledgeable when it comes to macros, VBA, scripts, etc., but Visio coding is an all new monster to me.
In short, I have a warehouse map layout with simple square shapes marking product locations, and I want to color-code the squares based on their Prop._VisDM_F2 data element. My code so far seems to work, but only for the 1st shape in the group of squares, but sometimes the master shape consists of 1 square, sometimes 6, and everything in between.
I've learned that the # in "Shapes(#)" selects which square gets changed, but I want them ALL to change. I've tried to get a count of how many individual shapes are in each master shape to use a variable integer as the #, but it didn't work.
Surely such a simple task can't really this complicated so I'm probably just missing something a step. Any help would be greatly appreciated!
'''
Dim selectObj As Visio.Shape
For Each selectObj In ActiveWindow.Selection
If selectObj.CellExistsU("Prop._VisDM_F2", Visio.VisExistsFlags.visExistsAnywhere) Then
selectObj.Shapes(1).Cells("Fillforegnd").FormulaU = visWhite
End If
Next
End Sub
'''