I won't list the many many permutations I tried that did not work.
My goal is to call a subroutine that takes the caller's name as an argument.
Something like:
Public Sub Shape_DoubleClick(ByVal shapeName As String)
Debug.Print "Shape_DoubleClick called for: " & shapeName
End Sub
But no matter what I write into the EventDblClick cell of the ShapeSheet, I do not see any activity.
I can not get anything that involves CALLTHIS to work in Visio. Can anyone show me an example?
Argument of called function must be Shape Object, not string!
Please read more in Remarks for CALLTHIS function description.
You can change your code like:
And formula in EventDblClick cell must be like:
CALLTHIS("ThisDocument.Shape_DoubleClick")UPDATED:
You can combine Shape object and string arguments:
For run this routine use formula:
CALLTHIS("ThisDocument.Shape_DoubleClick",,NAME())Please read more about CALLTHIS in article Using the CALLTHIS function in Visio by David J Parker!