Use Action Section

Started by Miguel, July 04, 2017, 12:54:22 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Miguel

Hello,

I have a new question for you!

I just add at my shape a new line on the Action Section of the DataSheet. I had only filed the name of my line on the Menu Cell. Therefore, I have a new line in my toolbar as the picture bellow.

I would like to create a litle code which could open a MsgBow when i click in my line just created.
I tried but it's a little difficult for me.

Thank you for help

Surrogate

Hi, Amigo !

i dont understand which MsgBox you want open and for what purpose?

Miguel

Quote from: Surrogate on July 04, 2017, 02:05:07 PM
Hi, Amigo !

i dont understand which MsgBox you want open and for what purpose?

Well, the MsgbOX is only to test. But if it works I think i could use the same example for my problem.

I repeat just in case it isn't clear. I added a new line in my toolbar which name "Unmagnet". I would like just open a MsgBox which says "Hello" when i click in "Unmagnet". 


Surrogate

#3
What you mean as your toolbar ?
ShapeSheet™ environment and VBA are different ways.
This post in thread - ShapeSheet & Smart Shapes.
And your question about code. What is you desired way ?

wapperdude

Observation: 
My interpretation is as follows...the post is about adding an entry to the right click menu, not adding an entry to the GUI toolbar.  Then, if a Visio user selects the action entry, the poster would like to trigger a bit of code which displays a vba MSGBOX.  Just as a test to verify that the code is triggered.

Based upon a previous post by this poster, and commonality of terms, I'm guessing that the goal is to possibly to automatically remove guard fcn in PinX, PinY cells to allow a selected pair of shapes to "unlock"...or something like that.

Well, time to get into the day's 4th of July festivities.

Wapperdude
Visio 2019 Pro

Miguel

Yeah,

that's all right Wapperdude. I tried to do this and it works but with problems.
That's what i did. As i said before, i worked on the Action Section. I filled out the Menu cell to gave a name at my new task. After that, i wrote a little to do apear my msgBox. But to operate my task when i click on it, i added in the Action cell the function RUNMACRO to operate my macro.

Mguel. 

wapperdude

Attached file provides example that use two methods to access a macro:
RUNMACRO
CALLTHIS

The 2nd method has more options if you need more than just a simple run of macro.  Press <alt> + F11 to bring up the VBA window to see the macros.  "MSG" is used with the RUNMACRO, while "M" is used with the CALLTHIS.

Wapperdude
Visio 2019 Pro