Repeated Cell Changed Events

K

ken.street

I have an application that uses VBA to control a Visio 2003 document.
When the user moves one of the shapes, it is detected through an event,
which may or may not in turn move the shape again. What I am
encountering is that the visEvtMod + visEvtCell event applied through
AddAdvise is being evaluated over and over (circa 20 times before
stopping) and I have not found any way of cancelling these repeated
automatic "events".

Any assistance would be greatly appreciated!
 
P

Paul Herber

I have an application that uses VBA to control a Visio 2003 document.
When the user moves one of the shapes, it is detected through an event,
which may or may not in turn move the shape again. What I am
encountering is that the visEvtMod + visEvtCell event applied through
AddAdvise is being evaluated over and over (circa 20 times before
stopping) and I have not found any way of cancelling these repeated
automatic "events".

The visEvtCell is firing for every cell that gets modified, try the
visEvtShape event instead, that should only fire once.
 
K

ken.street

Paul

Thanks for the suggestion but visEvtShape is not being triggered if the
shape is moved as the documentation describes only limited changes
which trigger a ShapeChanged event and PinX and PinY are not one of
them. Moving and changing the Shapes' shape do not trigger the event so
I cannot detect the user action.

Ken
 
P

Paul Herber

Sorry, got that wrong. Try visEvtFormula, you will need to filter the
cell name causing the event.
 

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