Thanks for your response.
I tried your code and it's not bad but not exactly what I expected. Instead of showing an error-message if the file is opened the program waits until the file is getting closed. That is not bad, but kind of useless for my problem.
I am sure we are pretty near to a solution, so can somebody tell me how it works - please ;)