Dynamic Excel worksheet cell to Visio text box

J

James-Ventura

I am creating a network diagram (Visio) where I have lots of data in an excel
spreadsheet and would like to extract certain cells and display them in a
text box with the server in the Visio (i.e. Serial #, Licenses #, Software
Versions...etc.). I want the data to be dynamic and I can't seem to figure
out how to get it done. My VBA skill are weak but I would think this is a
common request. Perhaps I don't know the correct search terminology to find
a solution.
 
A

Al Edlund

It is a common request (i.e. mirror some external data to custom properties
in visio dynamically/near real time). unfortunately it requires medium =>
good programming skills across both products (source and destination).
There is also the requirement that the source product support some form of
software event notification to trigger the changes.

here are two tips I kept on linked drawings
al

From Page 759 of Microsoft Visio Version 2002 Inside and Out book.



1) Tools / Macros/ Visio Extras / Database Wizard

2) Click Next

3) Select "Create A Linked Drawing or Modify An Existing One", and click

Next

4) Select "Add Database Actions And Events To a Drawing Page", and click

Next

5) Choose your Visio Drawing and page

6) Check the "Refresh linked shapes on document open", and click Next

7) Click Finish





This from another user





I tried this out a while back and was disappointed because you have to do

this for every page that contains a linked shape and my visio document

contained more than a hundred pages. So wrote a macro that loops through

all pages refreshes them with the database. I'm sure there is a way to make

the macro run when the document opens although I don't know what it is off

hand. Hope this helps.





' DatabaseRefresh

'

' This macro loops through all pages of your visio document and

' performs a Database Refresh by executing the Addon for refreshing

' the database ("Database Refresh").

Public Sub DatabaseRefresh()

Dim pg As Visio.Page

Dim OriginalPg As Visio.Page



' Record the original page

Set OriginalPg = ActiveWindow.Page



' Loop through each page of the document

For Each pg In ThisDocument.Pages



' Set the page to be the active page

ActiveWindow.Page = pg.Name



' Execute the "Database Refresh" Addon

Application.Addons("Database Refresh").Run ""



' Increment the page counter

Next pg



' Set the active page back to the original one so the

' user doesn't end up on the last page

ActiveWindow.Page = OriginalPg.Name



End Sub
 

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