I am working on a database program that outputs reports via EXcel. Presently I am using a common dialog to retrieve the filename the user wants to save the file as.

If the user chooses a filename that is already open in excel then I get an error. I need to be able to check if the file is already open (in excel) and prompt the user to close it. can anyone help

thanks

Jon