Calling actual Visio Dialogs from VBA\running code after a Visio Data Refresh

Started by AndyMacrae, February 01, 2023, 06:55:12 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

AndyMacrae

Hi,  I have custom code that changes the color of workstation objects depending on their reserved status, which it reads from an external data source.  What I need to do is have my "coloring code" run whenever the standard Data --> Refresh Data dialog is run from Visio at start up.  Is there some way to have my code trigger after this dialog is run?

Yacine

I wouldn't know of an event fired automatically after data refresh, but you write "at start up". Do you use the document_opened event? Then add to your already existing call for data refresh, a call to your coloring macro.


Secondly, it sounds weird to use a macro to color shapes. That's what smartshapes are for. Ie: you can set the color by means of formulas depending on values of the custom data.
Yacine


AndyMacrae