News:

BB code in posts seems to be working again!
I haven't turned on every single tag, so please let me know if there are any that are used/needed but not activated.

Main Menu

VBA to automatically update Visio drawing when Excel file is edited

Started by Kieron, November 24, 2022, 09:54:18 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Kieron

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.

Surrogate

Quote from: Kieron on November 24, 2022, 09:54:18 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

Browser ID: smf (possibly_robot)
Templates: 4: index (default), Display (default), GenericControls (default), GenericControls (default).
Sub templates: 6: init, html_above, body_above, main, body_below, html_below.
Language files: 4: index+Modifications.english (default), Post.english (default), Editor.english (default), Drafts.english (default).
Style sheets: 4: index.css, attachments.css, jquery.sceditor.css, responsive.css.
Hooks called: 161 (show)
Files included: 34 - 1306KB. (show)
Memory used: 1054KB.
Tokens: post-login.
Cache hits: 13: 0.00188s for 26,767 bytes (show)
Cache misses: 2: (show)
Queries used: 16.

[Show Queries]