Execute code stored in stencil

Started by KKAiii, February 10, 2017, 03:05:20 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

KKAiii

Using VISIO 2013 I have a VSSM stencil containing a Command Button. The button contains code I wish to execute when the button is placed onto a VISIO drawing.
The Command button will not execute the code when it has been dragged from the stencil onto the drawing.
I confirm that the code is in the Stencil's command button by "editing" the stencil, "editing" the command button master shape.
Isn't is possible to do this?

KKAiii

Found out how to do what I wanted.
It does not require a "Command" button.
Made a "VSSM" stencil.
Named it Macro Stencil
Put a shape in the stencil [used a rectangle].
Named the shape Macro1
While in edit mode for the Macro1 master, using Developer mode, added the code that I wished to execute to the sheet in the Macro1 master.
Exited edit mode, saved the VSSM stencil.
Opened the VSD file that I wanted the code to operate on.
Opened the VSSM stencil.
From the VSD file, in Developer mode, Code group, clicked Macros.
In the Macros pop up clicked the drop down for Macros In.
Saw the VSSM named Macro Stencil.
Selected it and clicked RUN.
It executed.
It operated on the VSD file I had open, as I wanted.