If it was vbscript, with onerror resume next, and someone modified function3 (which doesn't have resume next) to dim a variable that already existed in the global space, then the next it resumed on would be the else, which would then call the message box... ask me how I know.