Quantcast
Channel: Visio General Questions and Answers for IT Professionals forum
Viewing all articles
Browse latest Browse all 2333

How to Mimic the Functionality of the Database Wizard in MS Visio 2010?

$
0
0

Greetings. I am hoping that someone who is a little more familiar with VBA than I am will be able to help me find the best solution to this problem.

I have a large Visio diagram comprised of tens of pages and hundreds of shapes.  I also have an MS Access database, which I will use to store and manipulate some of the information found in the shapes' ShapeSheet cells.  This includes information such as the shape's foreground color, the value of its text field, its width and height, etc.

I need to link the database records and ShapeSheet cells in such a way that I can update the database by changing the diagram, and I can update the diagram by changing the values in the database.  I can do this using Visio's Database Wizard to link individual shapes to records, but there are too many of them to link each one by hand.  I was hoping that someone could show me how to mimic this function of the Database Wizard using VBA.

I have also considered that, if I can't link the records this way, I could write a sub that would parse through all of the shapes in the diagram and insert/update the database records as it went.  Unfortunately, this would be a slow and inefficient process.  Thus, I had also considered trying to use the Shape.CellChanged Event to only update records for the shape that is being modified.  However, neither of these solve the problem of how to push changes to database records back out to the diagram.  Any suggestions or advice on this issue would be greatly appreciated.


Viewing all articles
Browse latest Browse all 2333

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>