Question

Is there anyway to run a macro when you add or drop a shape from a container? Or is there a way to automatically run a small vba script every couple of seconds?

Était-ce utile?

La solution

The Visio Shapesheet EventDrop cell lets you specify code to call when the shape is dropped on the page. It also works when duplicating the shape.

If it's a VBA macro then you can use CALLTHIS or RUNMACRO. CALLTHIS requires that the first argument in your VBA macro is a Visio.Shape object, where RUNMACRO does not.

I don't know of any way to run a macro every few seconds, at least not any way that works well.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top