PDA

View Full Version : Solved: The Lifetime of the "Application.Iteration" Setting



Cyberdude
02-09-2007, 05:05 PM
Since I discovered the value of setting the "Iteration" property False when trying to find a circularity, I've been manually changing the "Iteration" setting to off in all my workbooks.

However, it seems at times that Excel sets the value back to True (On). While this may be my imagination, my question is: does the "Iteration" setting ever get reset to True under certain condions? :bug:

Cyberdude
02-11-2007, 12:16 PM
Is this question too stupid to warrant an answer??

mdmackillop
02-11-2007, 12:30 PM
Not at all Sid. I was giving this some thought.
I used to have a button for toggling Application.EnableEvents which showed whether the setting was true or false. Something like this for iteration might show when the change occurs, with an application event to update status when you change windows for example.
Regards
Malcolm

Norie
02-11-2007, 01:12 PM
Sid

Various of the settings accessed via Application will 'turn back on', others won't.

In particular one that can cause a lot of grief is Application.EnableEvents.

I've lost count of posts with questions like 'it was working before and isn't now' where the problem is that events were turned off and not turned back on for whatever reason.

Cyberdude
02-11-2007, 01:32 PM
Thanx for the replies, guys!

Norie, you triggered my next question. I never thought about it, but it seems that "On Error" is NOT an event. In any case, it seems that "Application.EnableEvents = False" does NOT disable "On Error". Is this the way it is supposed to work, i.e., "On Error" is NOT an event?

Norie
02-11-2007, 02:20 PM
Not quite sure what you mean there.

Personally I never try and use On Error, I prefer to if you like 'sort' the error at source.

I have though seen On Error being used and the result being the problem I mentioned. ie events not being triggered