NoEventsPending and CellChange events

Started by perry59, June 09, 2022, 07:55:07 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

perry59

I have a function which changes several bits of data on a shape. Naturally this fires the CellChange event which I listen for but in this case I want to ignore. In other similar cases I just set a global variable called "IgnoreCellChange" which I watch for in my CellChange handler and if set I exit the sub.
In this particular case though, the data I am changing is taking place within my NoEventsPending handler. It seems that the CellChanged events do NOT fire when the NoPendingEvents handler is active, they fire AFTER the NoPendingEvents handler has completed so setting my ignore flag is useless. That means I am doing extra processing which is not needed.
So, the gist of the question is, is this typical behavior, the cell change events do NOT fire from within a NoPendingEvents handler but are delayed until after?
Thanks

Paul Herber

I suspect that events do not fire within an event handler. That could cause very deep or even infinite recursion into the event handlers.
Electronic and Electrical engineering, business and software stencils for Visio -

https://www.paulherber.co.uk/

perry59

#2
Quote from: Paul Herber on June 11, 2022, 10:24:49 AM
I suspect that events do not fire within an event handler. That could cause very deep or even infinite recursion into the event handlers.
Agreed, there is potential for disaster there. Still trying to find a work around though.
Thought about just setting a timer and doing my shape changes a couple seconds after the previous events conclude, but for some reason when I create a timer object my addin will not load.
Perry