>Well, for example, if a file is opened EXCLUSIVELY by a sysadmin for cleanup or for any other reasons and a user tries to write some info to it after hitting the OK button. I'd like for my program to say: "The file is currently being used, please try again later!" for example and return to the form being just opened skipping the rest of the code in the OK button.
Stephanie,
I'm sorry. From your original question, I thought you had a specific case that you wanted to trap in your error, but IGNORE (or continue processing) and other kind of error. You are trying to do the opposite, which I understand...
Steve Gibson