0

I have put together a function in a ShapeSheet to allow my users to right click an object & select from prederermined colours.

Along with Actions & Scratch, The "FillForeground" in the ShapeSheet entry reads:

=IF(Scratch.A1=1,Sheet.1!Scratch.A1,IF(Scratch.A1=2,Sheet.1!Scratch.B1,0))

For the purpose of this question, I can simplify this function & just have a single colour:

=Sheet.1!Scratch.A1

Which contains the value RGB(255,0,0)

If want Blue instead of Red, I simply change RGB(255,0,0) to RGB(0,0,255) in the object 'Sheet.1' which changes my Red to Blue on the object with all the Actions, Scratches & FillForeground workings. All fine there.

Now, if I try to copy & paste my object (The one with the selectable colours), it loses it's references to the object containing my colour values. The above line, changes to:

REF()

The full line would look like this: =IF(Scratch.A1=1,REF(),IF(Scratch.A1=2,REF(),0))

Of course, the also happens when I bring pages into the mix:

=IF(Scratch.A1=1,Pages[Defaults]!Sheet.1!Scratch.A1,IF(Scratch.A1=2,Pages[Defaults]!Sheet.1!Scratch.B1,0))

Becomes:

=IF(Scratch.A1=1,REF(),IF(Scratch.A1=2,REF(),0))

Ultimately, I'd like a single object containing my colours on it's own page which I can hide. If I need to change those colours altogether. I would change this 'master' object & have all of my objects objects change across the document.

Does anyone know how I might be able to preserve those references which are changing to 'REF()'?

Russ
  • 47
  • 8

1 Answers1

0

You can try using Duplicate (Ctrl+D) which makes a direct clone, and generally preserves the formulas. Copy and Paste goes via the clipboard and formulas can loose their references.

JohnGoldsmith
  • 2,638
  • 14
  • 26
  • Hi John, thanks for the suggestion. Sadly this hasn't worked out for me as Duplicating the object places it on the same page. My primary goal is to have my 'reference' objects on a hidden page elsewhere & new objects refer to those objects. Copy/Paste seems to be the only way so far to create a copy on new pages. – Russ Dec 22 '15 at 09:40
  • Having just read up here (http://visualsignals.typepad.co.uk/vislog/2012/06/using-page-shape-data-in-visio-master-shapes.html), I've also tried storing the info I need in the "ThePage[Name]!Scratch.A1" but am ending up with the same "REF()" situation. – Russ Dec 22 '15 at 09:58