Visio Guy

Visio Discussions => General Visio => Topic started by: perry59 on June 09, 2022, 07:55:07 PM

Title: NoEventsPending and CellChange events
Post by: perry59 on June 09, 2022, 07:55:07 PM
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
Title: Re: NoEventsPending and CellChange events
Post by: 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.
Title: Re: NoEventsPending and CellChange events
Post by: perry59 on June 14, 2022, 03:36:14 PM
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