Author Topic: VBA to automatically update Visio drawing when Excel file is edited  (Read 307 times)

0 Members and 1 Guest are viewing this topic.

Kieron

  • Newbie
  • *
  • Posts: 1
Hi,

I am a beginner when it comes to using VBA in Visio.

I have a Visio drawing, as well as an Excel Export shape report of the drawing (both attached)to help explain my question.

What I am wondering is, would it be possible to manually change values in the "Displayed Text" column in the excel file (ShapeReport), and have a VBA Macro that would automatically import the data into the Visio drawing, and update the Visio drawing accordingly, changing the text of shapes and connectors etc. ?

I know there are posts on here relating to building a Visio drawing from an Excel file, but what I need to do is work on an already existing Visio Diagram and Excel File, to try and maintain consistency between both the files, so when the Excel changes so does the Visio.

I hope this makes sense.

Many thanks :)

EDIT: I understand you can add DataGraphics to shapes that can automatically update from external data sources, but this is not what I am hoping to achieve. I am trying to physically edit the Text of shapes and connectors, when text changes in an external Excel file.
« Last Edit: November 24, 2022, 06:41:08 AM by Kieron »

Surrogate

  • Hero Member
  • *****
  • Posts: 1636
    • ShapeSheet™ Knowledge Base
Re: VBA to automatically update Visio drawing when Excel file is edited
« Reply #1 on: November 24, 2022, 06:00:41 AM »
I know there are posts on here relating to building a Visio drawing from an Excel file, but what I need to do is work on an already existing Visio Diagram and Excel File, to try and maintain consistency between both the files, so when the Excel changes so does the Visio.
If you use Visio 2007+ Professional you can use Data Linking
https://youtu.be/0FDq596M7KA