How to retrieve a cell by prompt name

J

jhmosow

I am very green at Visio. I created an org chart using the wizard and
retrieving data from my SQL database. Very slick! I also have some
VBA code that I want to run after building the chart. The script is
to run and retrieve the employee number from the shape data. I
believe this is sometimes referred to as custom data.

The prompt name that appears on the shape is empnumber. I know I can
retrieve this using CellsSrc, but that uses a relative location.
Sometimes, I have to regenerate the chart and the relative location
has moved. If I could access this field by the prompt value, I could
use the code regardless of where that field is on the shape.

Any help, particularly sample code, would be greatly appreciated.
 
D

David Parker

Shape Data were called Custom Properties before Visio 2007 ... but I like
your combining the two as Custom Data!

A Shape Data row/Custom Property can be refernce by the row index or the row
name. Try switching to Developer Mode in Tools / Options then looking at
the Define Shape Data/Custom Propertties dialog, or looking at the
ShapeSheet.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top