Solved

How do I populate fields in a visio diagram from an Excel worksheet?

Posted on 2008-06-13
2
1,395 Views
Last Modified: 2012-08-14
I have created a printable Visio diagram that has a variety of text boxes scattered throughout that contain numbers. These numbers change over time, and I need to subsequently change the Visio diagram accordingly. However, I was wondering if there was a way to connect the values from certain fields in an Excel spreasheet to what is displayed on the Visio diagram, as the Excel spreadsheet is where these values are being changed. If I can do this, I merely change the spreadsheet, and then I can print an updated Visio diagram that reflects those changes.
Any ideas on how to do this?
0
Comment
Question by:plandau
2 Comments
 
LVL 59

Accepted Solution

by:
Chris Bottomley earned 125 total points
ID: 21791714
To set or establish the name of a text box:

Right click : format : special.

Modify the box names in column 1 to reflect your own box names and the box text dtrings in column D to reflect the new text to be used ... use a copy of your visio file as a test sequence.

Chris


    For shapeCount = 1 To ThisWorkbook.Sheets(1).Range("A" & ActiveSheet.Rows.Count).End(xlUp).Row

'        visdoc.Pages(1).Shapes(ThisWorkbook.Sheets(1).Range("A" & shapeCount).Text).SetCenter ThisWorkbook.Sheets(1).Range("B" & shapeCount).Value, ThisWorkbook.Sheets(1).Range("C" & shapeCount).Value

        visdoc.Pages(1).Shapes(ThisWorkbook.Sheets(1).Range("A" & shapeCount).Text).Text = ThisWorkbook.Sheets(1).Range("D" & shapeCount).Text

    Next

Open in new window

deleteme1.xls
0
 
LVL 30

Expert Comment

by:Scott Helmers
ID: 21794741
If you'd like an alternative that doesn't require programming, Visio 2007 Professional allows you to link shapes on a page to data in Excel quite easily. And once you've established the link, you can update the drawing manually or at a preset time interval.

Microsoft calls the feature "data linking" and includes some useful content on their web site:

-- demo: http://office.microsoft.com/en-us/visio/CH100740891033.aspx (see first demo)

-- tutorial: http://office.microsoft.com/en-us/training/CR101109221033.aspx (four tutorials on linking)
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
The ability to add structure to Visio diagrams using containers, lists and callouts is one of my favorite features in Visio 2010. In this article we’ll examine lists. We’ll explore containers and callouts in separate articles. Prior to reading th…
The viewer will learn how to simulate a series of sales calls dependent on a single skill level and learn how to simulate a series of sales calls dependent on two skill levels. Simulating Independent Sales Calls: Enter .75 into cell C2 – “skill leve…
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now