I'm using the following code to get fill color of a shape...
s = shp.CellsSRC(visSectionObject, visRowFill, visFillForegnd).FormulaU
this returns the value of "THEMEGUARD(TINT(THEME("AccentColor4"),24))" which seems greek to me. In the shape sheet I can clearly see the "RGB(113,65,83)" until I click the cell to edit the value. When I do click it the RGB value goes away and I can edit the value that is returned from the shp.CellsSRC method.
How do I get the RGB values of a shape?
thanks
kevin
Hi Kevin,
ShapeSheet cells have values and formulas.
Try this:
.Result(Visio.visUnitCodes.visNoCast)
instead of .Formula...
Thanks visio guy...
ok... so THEMEGUARD(TINT(THEME("AccentColor4"),24)) is a formula and the RGB color should be the value ?
When I tried using .Result(visNoCast) I get "41" which doesn't seem to be correct.
kevin
Yeah, but sometimes the colors get mapped to one of the indexed colors - like 0 is black and 1 is white. I haven't totally figured out what they're doing yet. The Themes stuff has made it even more complicated.
I just tried this and it works:
...Cells("FillForegnd").ResultStr(visNoCast)
gives you:
RGB(113, 191, 210)
Curiously, there's a constant for Visio.visUnitCodes.visUnitsColor, but that returned the index too.
thanks again....
the ResultStr is what I was looking for.... I should have just looked and tried it.
kevin