Author Topic: Get data from shape "on the left"  (Read 2861 times)

0 Members and 1 Guest are viewing this topic.

abssorb

  • Jr. Member
  • **
  • Posts: 42
Get data from shape "on the left"
« on: June 17, 2011, 06:23:21 AM »
I have a timeline across the top of a page and I'd like a row titled "Week commencing:" and boxes representing weeks with Monday's date in each.

The first box on the left has the first Monday of the timeline (which I can do automatically).  My newbie question is, how can I get subsequent boxes left to right to present their date as "the box on the left +7".  Easy in excel.

If I explicitly refer each box to the on eon the left I can get something which works if I change the date in box 1, but it's not very elegant.

I did have a thought that I could make a shape with an outbound connector, and when I glue it to an existing one, I could exploit the relationship somehow to grab data.  

Any tips on where to start?

(Visio 2003, VBA not available).

Jumpy

  • Hero Member
  • *****
  • Posts: 1061
Re: Get data from shape "on the left"
« Reply #1 on: June 17, 2011, 08:46:06 AM »
I did have a thought that I could make a shape with an outbound connector, and when I glue it to an existing one, I could exploit the relationship somehow to grab data.  

Any tips on where to start?

(Visio 2003, VBA not available).

VBA not available will make it tough if not impossible. Maybe wapperdude has an idea how to do it in the ShapeSheet alone, but your solution with identifying other shapes along a connector's path will require VBA and there are examples in the forum, how to do that.

vojo

  • Hero Member
  • *****
  • Posts: 1515
Re: Get data from shape "on the left"
« Reply #2 on: June 17, 2011, 02:42:12 PM »
There is a real kludgy non VBA option

- Create a template and probably a special stencil
- Add cells at the page level called user.basedate (why its a template)
- Left most shape uses Setf(getreg(thepage!user.basedate),<base date you want>)
      - could used props have a pop up to set base date on drop.....eventdrop = docmd(1312)
- Next shape has user.mydate = thepage!user.basedate+7
- next shape:  user.mydate = thepage!user.basedate+14
- and so on.

Pretty kludgy...but can be done

The key is to have 1 writer and N readers of any cell a the page level.....otherwise, this gets real real kludgy and, frankly, to complex to be useful.

abssorb

  • Jr. Member
  • **
  • Posts: 42
Re: Get data from shape "on the left"
« Reply #3 on: June 21, 2011, 03:57:43 AM »
Unfortunately vba is prohibited on the corporate network.  I can get around this locally, but this is for a template to have a wide distribution.  Thanks for the tips, I'll go with the "manual" solution I think. :)

vojo

  • Hero Member
  • *****
  • Posts: 1515
Re: Get data from shape "on the left"
« Reply #4 on: June 21, 2011, 01:48:21 PM »
assuming kludgy is ok....no VBA involved