Quote:

The problem is that because it has never worked this way changing the @ERROR value will break existing scripts.

Although it has caught you out AFAIK you are the first person, so it is a very rare event. In fact you might be the first person to have ever checked for a (real) error condition following a MessageBox()!




"Will" sounds so certain. I would prefer to say "might" since I doubt may people actually work with the @Error returned by MessageBox().

THis is not the first known case of being caught off guard by the @Error returned by MessageBox(). It has been discussed several times and I often use it in examples of overly optimistic coding where @Error is assumed. In fact, my examples include a short UDF that uses EXIT to clear @Error.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.