"user defined functions" in Visio?

R

rhatcher

Is it possible to use "user defined functions" in Visio VBA like in
Excel?
I tried the following:

Function HypotenuseLength(x, y)

HypotenuseLength = Sqr(x ^ 2 + y ^ 2)

End Function

VBA (Visio) accepted the function, however, I cant seem to use it in
the shapesheet.
 
A

Al Edlund

I believe the ability to execute code within the shapesheet is very limited
(and does not include user functions)
al
 
R

rhatcher

Ahh, That explains it.
Thanks

for a work around I might get away with creating a procedure that just
runs the FUNCTION and use "CallThis" from the spreadsheet to access the
procedure
 
M

Mark Nelson [MS]

You can do that, yes. Just be aware that CALLTHIS and other code execution
functions are run after recalc is completed in a Shapesheet. This is a
subtle timing issue that may or may not be a problem for you.

--
Mark Nelson
Office Graphics - Visio
Microsoft Corporation

This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top