Author Topic: Constraint Color of a Shape  (Read 258 times)

0 Members and 1 Guest are viewing this topic.

MatLcq

  • Newbie
  • *
  • Posts: 3
Constraint Color of a Shape
« on: November 26, 2019, 10:03:00 AM »
Hello,

I'm trying to constraint the available colors of a shape.
The idea is to allow the user to choose a shape color from the theme's accent colors only (from UI) and then to force a certain shade of the chosen theme's color.

So far, my option is to use a BOUND function in the FillForegnd cell of the shape's shapesheet. Something like... BOUND(THEMEGUARD(MSOTINT(THEMEVAL("AccentColor1"),40)),0,FALSE,... +list of the 5 possible accent colors)

It's working ok but it's not pretty (really long formula).

Has someone another idea?

Thank you.

Thomas Winkel

  • Full Member
  • ***
  • Posts: 194
Re: Constraint Color of a Shape
« Reply #1 on: November 27, 2019, 11:17:08 AM »
Hi,

Long Formulas could be divided with User cells.
I use an external editor or Excel to combine long formulas and then copy&paste it into the cell.
OK, that's not pretty. But if it is possible with a formula I prefer it over VBA.
Most important is the the usability for the end user.

Did you think about a color selector in shape data (via fixed list)? See attached screenshot.

MatLcq

  • Newbie
  • *
  • Posts: 3
Re: Constraint Color of a Shape
« Reply #2 on: November 28, 2019, 03:13:25 AM »
Yes, I thought about it. And I ended up doing that.
But I was looking for a way to use the built-in Visio color UI.

Thank you for your answer.