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?

有帮助吗?

解决方案

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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top