Visio Guy

Visio Discussions => ShapeSheet & Smart Shapes => Topic started by: Jules on May 12, 2011, 06:07:54 AM

Title: Behaviour of EventXFMod
Post by: Jules on May 12, 2011, 06:07:54 AM
Hi All,

Can anyone else confirm or otherwise that the EventXFMod cell triggers multiple times for a single re-size.
I start a new blank drawing, and draw a rectangle on it, and place a CALLTHIS or RUNMACRO function in it's EventXFMod cell pointing to a macro that simply displays a message box.  If I move the rectangle on the page, the message box pops up just once.  If I re-size the rectangle, the message box appears anywhere between 5 and 13 times.

Does anyone have any idea if this behaviour is fixable, or a way to work around it?

Many thanks
Jules
Title: Re: Behaviour of EventXFMod
Post by: hidden layer on July 28, 2022, 11:38:47 AM
oooooh - here the same. Because an error occure I can count the error messages. 5 to 20 roundabout.

The amount is maybe due to the fact that the shape is modified in some time. The shorter the time the less messages.

If I use Callthis("showxy") nothing happens, using Runmacro("showxy") the error message shows up.
Sub showxy()
On Error Resume Next
MsgBox "yes"
End Sub


No matter if the macro is within a module or not.

This post was read so often - nobody has an idea?

As I'm using Plan 2 this happens since then?

Is there another way to fill text into some shape out of a userdefined cell of a shape that will be modified just in size?

any hint is welcomed.

cheers
hl
Title: Re: Behaviour of EventXFMod
Post by: vojo on July 28, 2022, 11:51:43 AM
you should be able to go to insert ==> field.   In that drop down, you  can pick the user cell by name
only the value is inserted...you can format field (font, color, size)
Title: Re: Behaviour of EventXFMod
Post by: hidden layer on July 28, 2022, 01:13:23 PM
Hi vojo,
thanks! That's it. so simple... ::)

cheers
hl