Visio Guy

Visio Discussions => ShapeSheet & Smart Shapes => Topic started by: jeffc on January 16, 2014, 05:24:55 PM

Title: Link shapes on different pages
Post by: jeffc on January 16, 2014, 05:24:55 PM
Hello, first post -- long time lurker.

My Visio knowledge is fairly limited, and hence am challenged while trying to resolve this issue.  What I am trying to accomplish is using a formula in one shape, to extract data from a shape on a different page.  This is for Audio/Visual drawings where a cable is split between two pages; I use a custom callout on each page with a hyperlink connecting them.  I've tried using <=Pages[Prop.Remote_Page]!Prop.Remote_ID!User.Grid>.  Whether I use the shape data method or directly entering the information into the cell's formula, I get an error.  It's really frustrating me as to why I cannot get it to work.  Is there a better way to go about this?  I'm a stranger to VB as well, but will do what I must to make this happen.  Thanks in advance for an and all help!
Title: Re: Link shapes on different pages
Post by: jeffc on January 16, 2014, 07:22:26 PM
Ok, let me throw one more thing out there; since this is a shape linked to a master, should I be using the following formula?

Masters[Mastername]! Shapename!Cellreference

Will it traverse pages without any other coding?
Title: Re: Link shapes on different pages
Post by: Jumpy on January 17, 2014, 07:19:41 AM
I presume that the page and the shape you want to link are stored inside the propertys that are referenced in your formula?

=Pages[Prop.Remote_Page]!Prop.Remote_ID!User.Grid

That wont work, because if Prop.Remote_Page="Page-1" and  Prop.Remote_ID="Sheet.123" then what you have in the formula is sth. like:

=Pages["Page-1"]!"Sheet.123"!User.Grid

Your propertys will be interpreted as strings I guess. So you either don't use the propertys and place Page and Shape directly in formula:

=Pages[Page-1]!Sheet.123!User.Grid

or u create a new user defined cell with a formula like:

=DEPENDSON(Prop.Remote_Page)+SETF(GETREF(User.MyCell),"=Pages["&Prop.Remote_Page&"]!"&Prop.Remote_ID&"!User.Grid")

that pushes the correct formula to the cell User.MyCell whenever Prop.Remote_Page changes. Use similar formula for changes in Prop.Remote_ID or add a second Dependson to the one formula abobe, but I don't know if that will work.
Title: Re: Link shapes on different pages
Post by: JamesB on August 27, 2018, 05:17:48 AM
Any results Jeffc?
Title: Re: Link shapes on different pages
Post by: Surrogate on August 27, 2018, 06:45:30 AM
This thread (http://visguy.com/vgforum/index.php?topic=8522.msg37021#msg37021) can be helpful!